2024-05-23 20:26:30 +00:00
|
|
|
{
|
|
|
|
|
options,
|
|
|
|
|
config,
|
|
|
|
|
lib,
|
|
|
|
|
pkgs,
|
|
|
|
|
...
|
|
|
|
|
}:
|
|
|
|
|
with lib;
|
|
|
|
|
with lib.custom; let
|
|
|
|
|
cfg = config.apps.tools.tmux;
|
|
|
|
|
in {
|
|
|
|
|
options.apps.tools.tmux = with types; {
|
|
|
|
|
enable = mkBoolOpt false "Enable Tmux";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
2024-07-05 10:19:11 -04:00
|
|
|
programs.tmux = {
|
2024-05-23 20:26:30 +00:00
|
|
|
enable = true;
|
|
|
|
|
shell = "${pkgs.zsh}/bin/zsh";
|
2024-07-03 17:56:41 -04:00
|
|
|
catppuccin.enable = true;
|
2024-05-23 20:26:30 +00:00
|
|
|
historyLimit = 100000;
|
|
|
|
|
plugins = with pkgs; [
|
|
|
|
|
tmuxPlugins.sensible
|
|
|
|
|
tmuxPlugins.vim-tmux-navigator
|
|
|
|
|
tmuxPlugins.yank
|
2024-06-15 21:27:19 -04:00
|
|
|
tmuxPlugins.cpu
|
2024-05-23 20:26:30 +00:00
|
|
|
];
|
|
|
|
|
extraConfig = ''
|
|
|
|
|
set-option -sa terminal-overrides ",xterm*:Tc"
|
|
|
|
|
set -g mouse on
|
|
|
|
|
|
|
|
|
|
set -g base-index 1
|
|
|
|
|
set -g pane-base-index 1
|
|
|
|
|
setw -g mode-keys vi
|
|
|
|
|
set-window-option -g pane-base-index 1
|
|
|
|
|
set-option -g renumber-windows on
|
2024-06-15 21:27:19 -04:00
|
|
|
|
2024-11-13 20:35:13 -05:00
|
|
|
set -g @catppuccin_flavor "mocha"
|
|
|
|
|
set -g @catppuccin_window_status_style "basic"
|
|
|
|
|
set -g default-terminal "tmux-256color"
|
2024-11-14 23:40:28 -05:00
|
|
|
set -g allow-passthrough on
|
2024-11-13 20:35:13 -05:00
|
|
|
|
|
|
|
|
set -g status-right-length 100
|
|
|
|
|
set -g status-left-length 100
|
|
|
|
|
set -g status-left ""
|
|
|
|
|
set -g status-right "#{E:@catppuccin_status_application}"
|
|
|
|
|
set -agF status-right "#{E:@catppuccin_status_cpu}"
|
|
|
|
|
set -ag status-right "#{E:@catppuccin_status_session}"
|
|
|
|
|
set -ag status-right "#{E:@catppuccin_status_uptime}"
|
2024-05-23 20:26:30 +00:00
|
|
|
|
|
|
|
|
bind-key -T copy-mode-vi v send-keys -X begin-selection
|
|
|
|
|
bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle
|
|
|
|
|
bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel
|
|
|
|
|
|
|
|
|
|
bind '"' split-window -v -c "#{pane_current_path}"
|
|
|
|
|
bind % split-window -v -c "#{pane_current_path}"
|
|
|
|
|
|
|
|
|
|
unbind C-b
|
|
|
|
|
set -g prefix C-Space
|
|
|
|
|
bind C-Space send-prefix
|
|
|
|
|
|
|
|
|
|
bind -n M-H previous-window
|
|
|
|
|
bind -n M-L next-window
|
|
|
|
|
'';
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
}
|