diff options
Diffstat (limited to 'tmux-tsunami/modules/common/findFile.nix')
| -rw-r--r-- | tmux-tsunami/modules/common/findFile.nix | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/tmux-tsunami/modules/common/findFile.nix b/tmux-tsunami/modules/common/findFile.nix deleted file mode 100644 index 3d08603..0000000 --- a/tmux-tsunami/modules/common/findFile.nix +++ /dev/null @@ -1,66 +0,0 @@ -{ - pkgs, - config, - lib, - tsunamiLib, - std, - ... -}: let - inherit (tsunamiLib) scriptPath filePath; - cfg = config.tsunami.findFile; -in { - options = { - tsunami.findFile = { - enable = lib.mkOption { - type = lib.types.bool; - default = false; - }; - }; - }; - - config = lib.mkIf cfg.enable { - tsunami.keys.leader = [ - { - name = "Find File"; - key = "C-f"; - exec = ''run-shell "${scriptPath "minibuffer"} -d '#{?@default-path,#{@default-path},#{pane_current_path}}' '${scriptPath "find-file"}'"''; - } - ]; - tsunami.scripts = { - "minibuffer" = '' - window_height="$(tmux display -p '#{window_height}')" - tmux display-popup -EB \ - -w 100% -h 16 \ - -x 0 -y "$(($window_height + 1))" \ - "$@" - ''; - - "find-file" = ''${pkgs.broot}/bin/broot --conf ${filePath "broot_find_file.toml"}''; - }; - - tsunami.files."broot_find_file.toml" = std.serde.toTOML { - imports = ["~/.config/broot/conf.hjson"]; - quit_on_last_cancel = true; - verbs = [ - { - invocation = "tmux-split"; - external = ["bash" "-c" ''${scriptPath "split"} -c "#{?@default-path,#{@default-path},#{pane_current_path}}" "$EDITOR '{file}'"'']; - key = "ctrl-s"; - apply_to = "file"; - leave_broot = true; - } - { - invocation = "tmux-window"; - external = ["tmux" "new-window" "-c" "#{?@default-path,#{@default-path},#{pane_current_path}}" "$EDITOR '{file}'"]; - key = "ctrl-w"; - apply_to = "file"; - leave_broot = true; - } - { - key = "enter"; - cmd = ":tmux-window"; - } - ]; - }; - }; -} |
