Parcourir la source

feat(tmux): replace floax with native popups

Removes the  plugin and uses  to open lazygit and a new shell. This
simplifies the configuration and streamlines session startup by removing
the need for a dedicated terminal window.
Zander Hawke il y a 10 mois
Parent
commit
f0e7baaa7b
1 fichiers modifiés avec 6 ajouts et 8 suppressions
  1. 6 8
      home/features/cli/tmux.nix

+ 6 - 8
home/features/cli/tmux.nix

@@ -7,6 +7,8 @@
 let
   isDarwin = pkgs.stdenv.isDarwin;
   reattach-to-user-namespace = lib.getExe' pkgs.reattach-to-user-namespace "reattach-to-user-namespace";
+  lazygit = lib.getExe pkgs.lazygit;
+  shell = lib.getExe config.programs.fish.package;
 in
 {
   home.packages = with pkgs; [ eza ];
@@ -28,12 +30,6 @@ in
       tmux-select-pane-no-wrap
       vim-tmux-navigator
       yank
-      {
-        plugin = tmux-floax;
-        extraConfig = ''
-          set -g @floax-bind '-n C-`'
-        '';
-      }
       {
         plugin = inputs.sessionx.packages.${pkgs.system}.default;
         extraConfig = ''
@@ -44,7 +40,6 @@ in
           set -g @sessionx-name-template '{-2}/{-1}'
           set -g @sessionx-startup-command '${builtins.concatStringsSep " && " [
             "tmux new-window -n ai -t {session}"
-            "tmux new-window -n terminal -t {session}"
             "tmux rename-window -t {session}:1 editor"
             "tmux send-keys -t {session}:editor \"nvim\" Enter"
             "tmux send-keys -t {session}:ai \"nix shell nixpkgs#gemini-cli\" Enter"
@@ -102,7 +97,10 @@ in
       # move between tmux windows
       bind-key -n C-e select-window -t :1
       bind-key -n C-a select-window -t :2
-      bind-key -n C-t select-window -t :3
+
+      # some display popups
+      bind-key -n C-g display-popup -d "#{pane_current_path}" -w 80% -h 80% -E "${lazygit}"
+      bind-key -n C-t display-popup -d "#{pane_current_path}" -w 75% -h 75% -E "${shell}"
     '';
   };
 }