This commit is contained in:
mjallen18
2025-06-10 12:49:32 -05:00
parent 20e2ec1edf
commit c9046ec26f
2 changed files with 43 additions and 1 deletions

View File

@@ -43,7 +43,43 @@
java.enable = lib.mkDefault true;
mangohud.enable = lib.mkDefault true;
password-store.enable = true;
tmux.enable = true;
tmux = {
enable = true;
terminal = "screen-256color";
sensibleOnTop = true;
focusEvents = true;
newSession = true;
plugins = with pkgs; [
tmuxPlugins.cpu
{
plugin = tmuxPlugins.resurrect;
extraConfig = "set -g @resurrect-strategy-nvim 'session'";
}
{
plugin = tmuxPlugins.continuum;
extraConfig = ''
set -g @continuum-restore 'on'
set -g @continuum-save-interval '60' # minutes
'';
}
tmuxPlugins.better-mouse-mode
];
extraConfig = ''
set -g status-right '#[fg=black,bg=color15] #{cpu_percentage} %H:%M '
run-shell ${pkgs.tmuxPlugins.cpu}/share/tmux-plugins/cpu/cpu.tmux
set -g default-terminal "xterm-256color"
set -ga terminal-overrides ",*256col*:Tc"
set -ga terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[ q'
set-environment -g COLORTERM "truecolor"
# Mouse works as expected
set-option -g mouse on
# easy-to-remember split pane commands
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
'';
};
};
services = {

View File

@@ -19,5 +19,11 @@ in
plugins = [ "git" ];
theme = "fishy";
};
initContent = ''
if command -v tmux &> /dev/null && [ -z "$TMUX" ]; then
tmux attach-session -t default || tmux new-session -s default
fi
'';
};
}