feature(modules): split configuration into nix modules and home-manager modules #2
56
modules/home-manager/tmux.nix
Normal file
56
modules/home-manager/tmux.nix
Normal file
@@ -0,0 +1,56 @@
|
||||
{ config, pkgs, inputs, ... }:
|
||||
|
||||
{
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
prefix = "C-a";
|
||||
keyMode = "vi";
|
||||
mouse = true;
|
||||
terminal = "screen-256color";
|
||||
extraConfig = ''
|
||||
# Status keys
|
||||
set -g status-keys vi
|
||||
# Status bar options
|
||||
set -g status-interval 1
|
||||
set -g status on
|
||||
set -g status-justify left
|
||||
# Clock mode
|
||||
setw -g clock-mode-colour cyan
|
||||
# Colors
|
||||
set -g status-bg black
|
||||
set -g status-fg white
|
||||
# Key bindings
|
||||
# Reload configuration
|
||||
bind r source-file ~/.config/tmux/tmux.conf
|
||||
# Panel split and selection
|
||||
unbind %
|
||||
unbind '"'
|
||||
bind v split-window -v
|
||||
bind c split-window -h
|
||||
bind i new-window
|
||||
bind b previous-window
|
||||
bind n next-window
|
||||
# Move around panes with hjkl
|
||||
bind h select-pane -L
|
||||
bind j select-pane -D
|
||||
bind k select-pane -U
|
||||
bind l select-pane -R
|
||||
# Resize panes
|
||||
bind H resize-pane -L 5
|
||||
bind J resize-pane -D 5
|
||||
bind K resize-pane -U 5
|
||||
bind L resize-pane -R 5
|
||||
# Kill commands
|
||||
bind q kill-window
|
||||
bind Q kill-session
|
||||
# Bars
|
||||
set -g status-left "#[fg=black,bg=blue,bold] #S#[fg=blue,bg=black,nobold,noitalics,nounderscore]"
|
||||
set -g status-left "#[fg=black,bg=blue,bold] #S #[fg=blue,bg=black,nobold,noitalics,nounderscore]"
|
||||
set -g status-right "#{prefix_highlight}#[fg=brightblack,bg=black,nobold,noitalics,nounderscore]#[fg=white,bg=brightblack] %Y-%m-%d #[fg=white,bg=brightblack,nobold,noitalics,nounderscore]#[fg=white,bg=brightblack] %H:%M #[fg=cyan,bg=brightblack,nobold,noitalics,nounderscore]#[fg=black,bg=cyan,bold] #H "
|
||||
# Windows
|
||||
set -g window-status-format "#[fg=black,bg=brightblack,nobold,noitalics,nounderscore] #[fg=white,bg=brightblack]#I #[fg=white,bg=brightblack,nobold,noitalics,nounderscore] #[fg=white,bg=brightblack]#W #F #[fg=brightblack,bg=black,nobold,noitalics,nounderscore]"
|
||||
set -g window-status-current-format "#[fg=black,bg=cyan,nobold,noitalics,nounderscore] #[fg=black,bg=cyan]#I #[fg=black,bg=cyan,nobold,noitalics,nounderscore] #[fg=black,bg=cyan]#W #F #[fg=cyan,bg=black,nobold,noitalics,nounderscore]"
|
||||
set -g window-status-separator ""
|
||||
'';
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user