dotfiles/modules/home/apps/tmux/default.nix

60 lines
1.3 KiB
Nix
Raw Normal View History

{
lib,
config,
pkgs,
namespace,
...
}: let
inherit (lib) mkEnableOption;
inherit (pkgs) tmuxPlugins;
cfg = config.${namespace}.apps.tmux;
in {
options.${namespace}.apps.tmux = {
enable = mkEnableOption "tmux";
};
config = lib.mkIf cfg.enable {
programs.tmux = {
enable = true;
2024-08-12 02:21:41 +00:00
catppuccin.enable = true;
keyMode = "vi";
newSession = true;
sensibleOnTop = true;
terminal = "screen-256color";
plugins = [
{
plugin = tmuxPlugins.resurrect;
extraConfig = ''
set -g @resurrect-capture-pane-contents 'on'
set -g @resurrect-strategy-nvim 'session'
'';
}
{
plugin = tmuxPlugins.continuum;
extraConfig = ''
set -g @continuum-restore 'on'
'';
}
tmuxPlugins.open
2024-10-06 03:47:57 +00:00
tmuxPlugins.pain-control
2024-08-12 02:51:28 +00:00
tmuxPlugins.tmux-fzf
tmuxPlugins.vim-tmux-navigator
];
extraConfig = ''
# Scrolling with mouse wheel scrolls output instead of previous commands
setw -g mouse on
# Open panes in the same directory
bind c new-window -c "#{pane_current_path}"
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
'';
};
};
}