tmux
This commit is contained in:
@@ -43,7 +43,43 @@
|
|||||||
java.enable = lib.mkDefault true;
|
java.enable = lib.mkDefault true;
|
||||||
mangohud.enable = lib.mkDefault true;
|
mangohud.enable = lib.mkDefault true;
|
||||||
password-store.enable = 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 = {
|
services = {
|
||||||
|
|||||||
@@ -19,5 +19,11 @@ in
|
|||||||
plugins = [ "git" ];
|
plugins = [ "git" ];
|
||||||
theme = "fishy";
|
theme = "fishy";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
initContent = ''
|
||||||
|
if command -v tmux &> /dev/null && [ -z "$TMUX" ]; then
|
||||||
|
tmux attach-session -t default || tmux new-session -s default
|
||||||
|
fi
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user