extract_url: avoid unnecessary shell
This commit is contained in:
parent
eba9fd966c
commit
238238509f
@ -259,17 +259,15 @@ in {
|
|||||||
|
|
||||||
programs.tmux.extraConfig = let
|
programs.tmux.extraConfig = let
|
||||||
cmd = "${pkgs.extract_url}/bin/extract_url";
|
cmd = "${pkgs.extract_url}/bin/extract_url";
|
||||||
cfg = pkgs.writeText "urlviewrc" "COMMAND firefox";
|
cfg = pkgs.writeText "urlviewrc" ''
|
||||||
script = pkgs.writeShellApplication {
|
COMMAND sh -c 'xdg-open %s >/dev/null 2>&1 & disown'
|
||||||
name = "urlview";
|
'';
|
||||||
text = ''
|
in ''
|
||||||
tmux bind-key u capture-pane -J \\\; \
|
bind-key u capture-pane -J \; \
|
||||||
save-buffer "''${TMPDIR:-/tmp}/tmux-buffer" \\\; \
|
save-buffer /tmp/tmux-buffer \; \
|
||||||
delete-buffer \\\; \
|
delete-buffer \; \
|
||||||
split-window -l 10 "${cmd} -c ${cfg} ''${TMPDIR:-/tmp}/tmux-buffer"
|
split-window -l 10 "${cmd} -c ${cfg} /tmp/tmux-buffer"
|
||||||
'';
|
'';
|
||||||
};
|
|
||||||
in "run-shell ${script}/bin/urlview";
|
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
cbatticon.enable = true;
|
cbatticon.enable = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user