2024-12-05 19:32:44 +00:00
|
|
|
{ pkgs, ... }: {
|
2024-12-22 19:42:10 +00:00
|
|
|
|
2023-07-23 18:44:51 +00:00
|
|
|
programs.tmux = {
|
|
|
|
enable = true;
|
2024-12-05 19:32:44 +00:00
|
|
|
aggressiveResize = true;
|
2023-07-23 18:44:51 +00:00
|
|
|
baseIndex = 1;
|
|
|
|
clock24 = true;
|
2024-12-05 19:32:44 +00:00
|
|
|
customPaneNavigationAndResize = true;
|
2023-07-23 21:09:58 +00:00
|
|
|
escapeTime = 50;
|
2024-12-20 01:11:02 +00:00
|
|
|
# focusEvents = true;
|
2023-07-23 18:44:51 +00:00
|
|
|
historyLimit = 100000;
|
|
|
|
keyMode = "vi";
|
2023-07-23 21:09:58 +00:00
|
|
|
mouse = true;
|
2024-12-20 02:32:59 +00:00
|
|
|
shell = "${pkgs.fish}/bin/fish";
|
2024-12-22 20:23:49 +00:00
|
|
|
plugins = with pkgs.tmuxPlugins; [ catppuccin cpu weather ];
|
2023-07-23 18:44:51 +00:00
|
|
|
extraConfig = ''
|
2024-12-22 19:42:10 +00:00
|
|
|
# catppuccin theme options
|
|
|
|
set -g @catppuccin_flavour "mocha"
|
2024-12-22 20:43:35 +00:00
|
|
|
set -g @catppuccin_status_modules_right "application cpu weather session"
|
2024-12-22 20:23:49 +00:00
|
|
|
set -g @tmux-weather-units "u"
|
2024-12-22 19:42:10 +00:00
|
|
|
run-shell ${pkgs.tmuxPlugins.catppuccin}/share/tmux-plugins/catppuccin/catppuccin.tmux
|
2024-12-22 20:23:49 +00:00
|
|
|
run-shell ${pkgs.tmuxPlugins.cpu}/share/tmux-plugins/cpu/cpu.tmux
|
|
|
|
run-shell ${pkgs.tmuxPlugins.weather}/share/tmux-plugins/weather/tmux-weather.tmux
|
2024-12-22 19:42:10 +00:00
|
|
|
|
2023-08-16 14:10:45 +00:00
|
|
|
# new panes inherit current working directory
|
|
|
|
bind '%' split-window -h -c '#{pane_current_path}'
|
|
|
|
bind '"' split-window -v -c '#{pane_current_path}'
|
|
|
|
|
2023-07-23 18:44:51 +00:00
|
|
|
# navigating panes with Ctrl+{hjkl}
|
|
|
|
bind -n C-h select-pane -L
|
|
|
|
bind -n C-j select-pane -D
|
|
|
|
bind -n C-k select-pane -U
|
|
|
|
bind -n C-l select-pane -R
|
|
|
|
|
|
|
|
# synchronize panes with S
|
|
|
|
bind S set-window-option synchronize-panes \; display-message 'Synchronize-panes #{?pane_synchronized,on,off}'
|
|
|
|
|
|
|
|
# swap panes with <>
|
|
|
|
bind > swap-pane -D
|
|
|
|
bind < swap-pane -U
|
|
|
|
|
|
|
|
# window operations
|
|
|
|
unbind n
|
|
|
|
unbind w
|
|
|
|
bind n command-prompt "rename-window '%%'"
|
2023-08-16 14:10:45 +00:00
|
|
|
bind w new-window
|
2023-07-23 18:44:51 +00:00
|
|
|
bind -n M-j previous-window # alt+j
|
|
|
|
bind -n M-k next-window # alt+k
|
|
|
|
|
2024-12-05 20:20:02 +00:00
|
|
|
# shorter status update interval
|
|
|
|
set-option -g status-interval 1
|
2024-12-05 19:32:44 +00:00
|
|
|
|
2024-01-18 16:00:52 +00:00
|
|
|
# display up to 20 chars of session name
|
|
|
|
set-option -g status-left-length 20
|
|
|
|
|
2023-07-23 18:44:51 +00:00
|
|
|
# default statusbar colors
|
|
|
|
set-option -g status-style fg=yellow,bg=black
|
|
|
|
|
|
|
|
# default window title colors
|
|
|
|
set-window-option -g window-status-style fg=brightblue,bg=default
|
|
|
|
#set-window-option -g window-status-style dim
|
|
|
|
|
|
|
|
# active window title colors
|
|
|
|
set-window-option -g window-status-current-style fg=brightred,bg=default
|
|
|
|
#set-window-options -g window-status-current-style bright
|
|
|
|
|
|
|
|
# pane border
|
|
|
|
set-option -g pane-border-style fg=black
|
|
|
|
set-option -g pane-active-border-style fg=brightgreen
|
|
|
|
|
|
|
|
# message text
|
|
|
|
set-option -g message-style fg=brightred,bg=black
|
|
|
|
|
|
|
|
# pane number display
|
|
|
|
set-option -g display-panes-active-colour blue
|
|
|
|
set-option -g display-panes-colour brightred
|
|
|
|
|
|
|
|
# clock
|
|
|
|
set-window-option -g clock-mode-colour brightgreen
|
|
|
|
|
|
|
|
# bell
|
|
|
|
set-window-option -g window-status-bell-style fg=black,bg=red
|
2024-01-26 22:47:28 +00:00
|
|
|
|
|
|
|
# clipboard
|
|
|
|
set-option -s set-clipboard on
|
2024-12-09 22:50:16 +00:00
|
|
|
|
|
|
|
# terminal colors
|
|
|
|
set-option -g default-terminal "tmux-256color"
|
|
|
|
set-option -a terminal-features "xterm-256color:RGB"
|
2023-07-23 18:44:51 +00:00
|
|
|
'';
|
|
|
|
};
|
2024-12-05 19:32:44 +00:00
|
|
|
|
|
|
|
home.shellAliases = {
|
|
|
|
tm = "tmux";
|
|
|
|
tms = "tmux new -s";
|
|
|
|
tml = "tmux list-sessions";
|
|
|
|
tma = "tmux attach -t";
|
|
|
|
tmk = "tmux kill-session -t";
|
|
|
|
};
|
2023-07-23 18:44:51 +00:00
|
|
|
}
|
|
|
|
|