extract_url: separate cfg to it's own variable

This commit is contained in:
Motiejus Jakštys 2024-04-15 16:31:46 +03:00 committed by Motiejus Jakštys
parent b341f78c8d
commit f1d6bc0fde

View File

@ -206,12 +206,16 @@ in {
set-option -g default-terminal "screen-256color" set-option -g default-terminal "screen-256color"
set-option -sa terminal-features ',xterm-256color:RGB' set-option -sa terminal-features ',xterm-256color:RGB'
run-shell ${pkgs.writeShellScript "urlview" '' run-shell ${let
tmux bind-key u capture-pane -J \\\; \ cmd = "${pkgs.extract_url}/bin/extract_url";
save-buffer "''${TMPDIR:-/tmp}/tmux-buffer" \\\; \ cfg = pkgs.writeText "urlviewrc" "COMMAND firefox";
delete-buffer \\\; \ in
split-window -l 10 "${pkgs.extract_url}/bin/extract_url -c ${pkgs.writeText "urlviewrc" "COMMAND firefox"} ''${TMPDIR:-/tmp}/tmux-buffer" pkgs.writeShellScript "urlview" ''
''} tmux bind-key u capture-pane -J \\\; \
save-buffer "''${TMPDIR:-/tmp}/tmux-buffer" \\\; \
delete-buffer \\\; \
split-window -l 10 "${cmd} -c ${cfg} ''${TMPDIR:-/tmp}/tmux-buffer"
''}
''; '';
}; };
} }