feat(home-manager): add tmux module
This commit is contained in:
parent
82483fc0f9
commit
a625471f8a
3 changed files with 69 additions and 0 deletions
|
@ -12,6 +12,7 @@
|
||||||
git.enable = true;
|
git.enable = true;
|
||||||
neovim.enable = true;
|
neovim.enable = true;
|
||||||
starship.enable = true;
|
starship.enable = true;
|
||||||
|
tmux.enable = true;
|
||||||
utils.enable = true;
|
utils.enable = true;
|
||||||
vifm.enable = true;
|
vifm.enable = true;
|
||||||
zellij.enable = true;
|
zellij.enable = true;
|
||||||
|
|
67
modules/home-manager/cli/tmux/default.nix
Normal file
67
modules/home-manager/cli/tmux/default.nix
Normal file
|
@ -0,0 +1,67 @@
|
||||||
|
|
||||||
|
{ lib, config, pkgs, ... }:
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
cfg = config.modules.cli.tmux;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.modules.cli.tmux = {
|
||||||
|
enable = mkEnableOption "enable Tmux";
|
||||||
|
};
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
programs.tmux = {
|
||||||
|
enable = true;
|
||||||
|
aggressiveResize = true;
|
||||||
|
baseIndex = 1;
|
||||||
|
customPaneNavigationAndResize = false;
|
||||||
|
escapeTime = 0;
|
||||||
|
focusEvents = true;
|
||||||
|
keyMode = "vi";
|
||||||
|
mouse = true;
|
||||||
|
prefix = "C-a";
|
||||||
|
terminal = "tmux-256color";
|
||||||
|
extraConfig = ''
|
||||||
|
|
||||||
|
bind -n -N "Select pane to the left of the active pane" M-h select-pane -L
|
||||||
|
bind -n -N "Select pane below the active pane" M-j select-pane -D
|
||||||
|
bind -n -N "Select pane above the active pane" M-k select-pane -U
|
||||||
|
bind -n -N "Select pane to the right of the active pane" M-l select-pane -R
|
||||||
|
|
||||||
|
bind -n -r -N "Resize the pane left by 5" M-H resize-pane -L 5
|
||||||
|
bind -n -r -N "Resize the pane down by 5" M-J resize-pane -D 5
|
||||||
|
bind -n -r -N "Resize the pane up by 5" M-K resize-pane -U 5
|
||||||
|
bind -n -r -N "Resize the pane right by 5" M-L resize-pane -R 5
|
||||||
|
bind -n -n M-n split-window -h -c "#{pane_current_path}"
|
||||||
|
bind -n -n M-N split-window -v -c "#{pane_current_path}"
|
||||||
|
|
||||||
|
# Theme
|
||||||
|
set -g status-interval 2
|
||||||
|
setw -g automatic-rename on # rename window to reflect current program
|
||||||
|
set -g renumber-windows on # renumber windows when a window is closed
|
||||||
|
set -g set-titles on
|
||||||
|
set -g mode-style bg=colour10,fg=colour13
|
||||||
|
set -g set-titles-string "#T"
|
||||||
|
set -g status-bg colour0
|
||||||
|
set -g status-fg colour7
|
||||||
|
set -g message-style bg=colour10,fg=colour7
|
||||||
|
|
||||||
|
setw -g window-status-current-format '#[fg=colour10,bg=colour3] #I\
|
||||||
|
#[bg=colour10,fg=colour7,bold] #W\
|
||||||
|
#{?window_active, ,}#{?window_marked_flag, ,}#{?window_activity_flag, ,}#{?window_silence_flag, ,}#{?window_zoomed_flag, ,}#{?window_bell_flag,#[fg=colour1] ,}'
|
||||||
|
|
||||||
|
set -g pane-border-style fg=colour11
|
||||||
|
set -g pane-active-border-style fg=colour4
|
||||||
|
|
||||||
|
setw -g window-status-format '#[bg=color4,fg=colour10] #I\
|
||||||
|
#[bg=colour10,fg=colour12] #W\
|
||||||
|
#{?window_last_flag, ,}#{?window_marked_flag, ,}#{?window_activity_flag, ,}#{?window_silence_flag, ,}#{?window_zoomed_flag, ,}#{?window_bell_flag,#[fg=colour1] ,}'
|
||||||
|
set -g status-left "#[bg=colour0, fg=colour6] #S "
|
||||||
|
set -g status-right ""
|
||||||
|
'';
|
||||||
|
plugins = with pkgs; [
|
||||||
|
tmuxPlugins.tmux-fzf
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
./cli/git
|
./cli/git
|
||||||
./cli/neovim
|
./cli/neovim
|
||||||
./cli/starship
|
./cli/starship
|
||||||
|
./cli/tmux
|
||||||
./cli/utils
|
./cli/utils
|
||||||
./cli/vifm
|
./cli/vifm
|
||||||
./cli/zellij
|
./cli/zellij
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue