diff options
| author | Collin Williams <96917990+bluedragon1221@users.noreply.github.com> | 2026-07-15 06:54:33 -0500 |
|---|---|---|
| committer | Collin Williams <96917990+bluedragon1221@users.noreply.github.com> | 2026-07-15 06:54:33 -0500 |
| commit | 8b990276c5e9abccd772694b1f7232d8b49b634c (patch) | |
| tree | 23f4c3713c538f435354270de2005475c50955d0 /modules/common/sessionizer2.nix | |
initial commit
Diffstat (limited to 'modules/common/sessionizer2.nix')
| -rw-r--r-- | modules/common/sessionizer2.nix | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/modules/common/sessionizer2.nix b/modules/common/sessionizer2.nix new file mode 100644 index 0000000..5f159df --- /dev/null +++ b/modules/common/sessionizer2.nix @@ -0,0 +1,50 @@ +{ + pkgs, + config, + lib, + tsunamiLib, + std, + ... +}: let + inherit (tsunamiLib) scriptPath filePath; + cfg = config.tsunami.sessionizer2; +in { + options.tsunami.sessionizer2 = { + enable = lib.mkOption { + type = lib.types.bool; + default = true; + }; + }; + + config = lib.mkIf cfg.enable { + tsunami.keys.leader = [ + { + name = "New Session"; + key = "C-n"; + exec = "run-shell ${scriptPath "sessions-menu"}"; + } + ]; + + tsunami.files = { + "broot_sessionizer2_launcher" = std.serde.toTOML { + imports = ["~/.config/broot/conf.hjson"]; # inherit from user's config + verbs = [ + { + invocation = "tmux-window"; + external = ["tmux" "new-window" "-c" "#{?@default-path,#{@default-path},#{pane_current_path}}" "$EDITOR '{file}'"]; + key = "enter"; + apply_to = "file"; + leave_broot = false; + } + { + invocation = "tmux-window"; + external = ["tmux" "new-window" "-c" "#{?@default-path,#{@default-path},#{pane_current_path}}" "$EDITOR '{file}'"]; + key = "enter"; + apply_to = "file"; + leave_broot = false; + } + ]; + }; + }; + }; +} |
