From d2aecd69c17fa64305c07333686576152432993d Mon Sep 17 00:00:00 2001 From: Collin Williams <96917990+bluedragon1221@users.noreply.github.com> Date: Wed, 15 Jul 2026 12:03:58 -0500 Subject: changes. --- tmux-tsunami/modules/common/fzfExec.nix | 55 --------------------------------- 1 file changed, 55 deletions(-) delete mode 100644 tmux-tsunami/modules/common/fzfExec.nix (limited to 'tmux-tsunami/modules/common/fzfExec.nix') diff --git a/tmux-tsunami/modules/common/fzfExec.nix b/tmux-tsunami/modules/common/fzfExec.nix deleted file mode 100644 index 2de3741..0000000 --- a/tmux-tsunami/modules/common/fzfExec.nix +++ /dev/null @@ -1,55 +0,0 @@ -{ - tsunamiLib, - lib, - pkgs, - config, - ... -}: let - inherit (tsunamiLib) scriptPath; - cfg = config.tsunami.fzfExec; -in { - options = { - tsunami.fzfExec = { - enable = lib.mkOption { - type = lib.types.bool; - default = true; - }; - }; - }; - - config = lib.mkIf cfg.enable { - tsunami.scripts = { - # this is buggy af; it only works half the time. - # But it's the only way I know of to get docs on a specific tmux command - "tmux-doc" = '' - usage=$(tmux list-commands -F "#{command_list_name} #{command_list_usage}" "$1") - - man tmux | ${pkgs.gawk}/bin/awk -v usage="$usage" ' - index($0, usage) > 0 { found=1 } - found { - print - if ($0 == "") exit - } - ' - ''; - - "fzf-exec" = '' - all_cmds() { - tmux list-commands -F $'#{command_list_name}#{?command_list_alias,\n#{command_list_alias},}' - } - - selected_cmd=$(all_cmds | ${pkgs.fzf}/bin/fzf --bind 'enter:accept-or-print-query,tab:replace-query,alt-backspace:clear-query' --prompt : --preview "~/.config/tmux/scripts/tmux-doc.sh $(printf '{}' | cut -d' ' -f1)") - test -z "$selected_cmd" && exit - - tmux $(echo "$selected_cmd" | sed "s@~@$HOME@g") - ''; - }; - - tsunami.keys.global = [ - { - key = "M-x"; - exec = "run-shell '${scriptPath "minibuffer"} -h 10 ${scriptPath "fzf-exec"}'"; - } - ]; - }; -} -- cgit v1.3.1