aboutsummaryrefslogtreecommitdiff
path: root/tmux-tsunami/modules/common/findFile.nix
diff options
context:
space:
mode:
authorCollin Williams <96917990+bluedragon1221@users.noreply.github.com>2026-07-15 12:03:58 -0500
committerCollin Williams <96917990+bluedragon1221@users.noreply.github.com>2026-07-15 12:03:58 -0500
commitd2aecd69c17fa64305c07333686576152432993d (patch)
tree2f52c7808a6cbd57ef60284947d3728a38cfab34 /tmux-tsunami/modules/common/findFile.nix
parentf5ef0cf848e65d4fea2be8dee7bc1c72ad67046f (diff)
changes.
Diffstat (limited to 'tmux-tsunami/modules/common/findFile.nix')
-rw-r--r--tmux-tsunami/modules/common/findFile.nix66
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";
- }
- ];
- };
- };
-}