Skip to content

Commit

Permalink
tmux: add fzf for switching sessions and windows
Browse files Browse the repository at this point in the history
  • Loading branch information
tiborpilz committed Mar 26, 2024
1 parent 843f2d0 commit 51bec65
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions home/modules/shell/tmux.nix
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ in
tmuxPlugins.net-speed
tmuxPlugins.cpu
tmuxPlugins.sidebar
tmuxPlugins.tmux-fzf
];

baseIndex = 1;
Expand All @@ -54,6 +55,12 @@ in
# Attach current directory to session
bind a attach -c "#{pane_current_path}"
# Use tmux-fzf to switch sessions
bind-key S run-shell -b "${pkgs.tmuxPlugins.tmux-fzf}/share/tmux-plugins/tmux-fzf/scripts/session.sh switch"
# Use tmux-fzf to switch windows
bind-key W run-shell -b "${pkgs.tmuxPlugins.tmux-fzf}/share/tmux-plugins/tmux-fzf/scripts/window.sh switch"
# Reload tmux config with prefix + r
bind-key r source-file $XDG_CONFIG_HOME/tmux/tmux.conf
Expand Down Expand Up @@ -134,6 +141,7 @@ in
TMUX_HOME = "${config.home.sessionVariables.XDG_CONFIG_HOME}/tmux";
TMUXIFIER = "${config.home.sessionVariables.XDG_CONFIG_HOME}/tmuxifier";
TMUXIFIER_LAYOUT_PATH = "${config.home.sessionVariables.XDG_CONFIG_HOME}/tmuxifier";
TMUX_FZF_OPTIONS = "-p -w 75% -h 66% -m";
};
};
}

0 comments on commit 51bec65

Please sign in to comment.