treewide: move defaults to dedicated folder

This commit is contained in:
Elec3137 2026-03-23 20:41:34 -07:00
commit 00c06f982b
6 changed files with 0 additions and 0 deletions

58
defaults/tmux.nix Normal file
View file

@ -0,0 +1,58 @@
{
lib,
config,
...
}:
let
name = "tmux";
cfg = config.nixowos.cli.${name};
in
{
options.nixowos.cli.${name} = {
enable = lib.mkEnableOption name;
};
config = lib.mkIf cfg.enable {
programs.tmux = lib.mkDefault {
enable = true;
# this is a sin committed for ergonomics
# since "1" and "0" are quite far apart on most keyboards
baseIndex = 1;
keyMode = "vi";
# https://unix.stackexchange.com/questions/608142/whats-the-effect-of-escape-time-in-tmux
escapeTime = 50;
clock24 = true;
extraConfig = /* sh */ ''
set -g mouse on
# open new shells in the same working directory
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
###### STYLING
set -g status-style 'fg=pink'
setw -g window-status-style 'fg=pink bg=black'
setw -g window-status-format ' #I #[fg=white]#W #[fg=pink]#F '
setw -g window-status-current-style 'fg=black bg=pink'
setw -g window-status-current-format ' #I #W #F '
set -g message-style 'fg=black bg=pink'
set -g mode-style 'fg=black bg=pink'
set -g pane-border-style 'fg=grey'
set -g pane-active-border-style 'fg=pink'
'';
};
};
}