dots-of-war/files/nix-stuff/nixpkgs/modules/term/tmux.nix

57 lines
1.6 KiB
Nix
Raw Normal View History

2020-08-11 14:25:46 +00:00
{ config, lib, pkgs, ... }:
let
cfg = config.elkowar.programs.tmux;
myConf = import ../myConfig.nix;
in
2020-07-07 09:11:11 +00:00
{
2020-08-11 14:25:46 +00:00
options.elkowar.programs.tmux = {
enable = lib.mkEnableOption "Enable the tmux configuration";
};
2020-07-07 09:11:11 +00:00
2020-08-11 14:25:46 +00:00
config = lib.mkIf cfg.enable {
programs.tmux = {
enable = true;
clock24 = true;
historyLimit = 10000;
keyMode = "vi";
shortcut = "y";
terminal = "tmux-256color";
2020-08-24 13:57:25 +00:00
escapeTime = 0;
2020-08-11 14:25:46 +00:00
customPaneNavigationAndResize = true;
extraConfig = ''
2020-08-25 22:26:00 +00:00
set -ga terminal-overrides ",*col*:Tc"
2020-08-11 14:25:46 +00:00
bind v split-window -h -c "#{pane_current_oath}"
bind b split-window -v -c "#{pane_current_oath}"
bind c new-window -c "#{pane_current_path}"
unbind '"'
unbind %
set -g mouse on
2020-07-07 09:11:11 +00:00
2020-08-11 14:25:46 +00:00
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi y send-keys -X copy-selection
bind-key -T copy-mode-vi r send-keys -X rectangle-toggle
unbind [
bind < copy-mode
unbind p
bind > paste-buffer
bind-key C-a set -g status off
bind-key C-s set -g status on
bind -T copy-mode-vi MouseDragEnd1Pane send-keys -M -X copy-pipe 'xclip -in -selection clipboard'
2020-07-07 09:11:11 +00:00
2020-08-11 14:25:46 +00:00
set-option -g visual-activity off
set-option -g visual-bell off
set-option -g visual-silence off
set-window-option -g monitor-activity off
set-option -g bell-action none
'';
2020-07-07 09:11:11 +00:00
2020-08-11 14:25:46 +00:00
plugins = with pkgs.tmuxPlugins; [
{
plugin = prefix-highlight;
}
];
};
};
2020-07-07 09:11:11 +00:00
}