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