32 lines
775 B
Nix
32 lines
775 B
Nix
|
{ config, lib, libS, ... }:
|
||
|
|
||
|
let
|
||
|
cfg = config.programs.tmux;
|
||
|
in
|
||
|
{
|
||
|
options = {
|
||
|
programs.tmux.recommendedDefaults = libS.mkOpinionatedOption "set recommended default settings";
|
||
|
};
|
||
|
|
||
|
config = lib.mkIf cfg.recommendedDefaults {
|
||
|
programs.tmux = {
|
||
|
keyMode = "vi";
|
||
|
shortcut = "Space";
|
||
|
aggressiveResize = true;
|
||
|
baseIndex = 1;
|
||
|
clock24 = true;
|
||
|
escapeTime = 100;
|
||
|
terminal = "xterm-256color";
|
||
|
extraConfig = ''
|
||
|
# focus events enabled for terminals that support them
|
||
|
set -g focus-events on
|
||
|
|
||
|
# open new tab in PWD
|
||
|
bind '"' split-window -c "#{pane_current_path}"
|
||
|
bind % split-window -h -c "#{pane_current_path}"
|
||
|
bind c new-window -c "#{pane_current_path}"
|
||
|
'';
|
||
|
};
|
||
|
};
|
||
|
}
|