Added tmux to dingserver

This commit is contained in:
2022-06-30 14:07:02 +01:00
parent da84546561
commit 7736586670
4 changed files with 42 additions and 9 deletions

View File

@@ -11,6 +11,7 @@
./caddy.nix
./synapse.nix
./prometheus.nix
./tmux.nix
];
# Force disable the common boot loader

38
hosts/dingserver/tmux.nix Normal file
View File

@@ -0,0 +1,38 @@
{...}: {
programs.tmux = {
enable = true;
keyMode = "vi";
terminal = "tmux-256color";
escapeTime = 0;
baseIndex = 1;
historyLimit = 10000;
clock24 = true;
extraConfig = ''
unbind-key -a -T prefix
unbind-key -a -T root
unbind-key -a -T copy-mode
unbind-key -a -T copy-mode-vi
set -g prefix M-w
bind q detach
bind space copy-mode
bind -T copy-mode-vi Escape send-keys -X cancel
bind -T copy-mode-vi Escape send -X cancel
bind -T copy-mode-vi k send -X cursor-up
bind -T copy-mode-vi j send -X cursor-down
bind -T copy-mode-vi h send -X cursor-left
bind -T copy-mode-vi l send -X cursor-right
bind -T copy-mode-vi Space send -X begin-selection
bind -T copy-mode-vi y send -X copy-selection-no-clear
bind -T copy-mode-vi Enter send -X copy-selection-and-cancel
set -g mouse on
bind -n WheelUpPane copy-mode -e
bind -T copy-mode-vi WheelUpPane send -X -N 5 scroll-up
bind -T copy-mode-vi WheelDownPane send -X -N 5 scroll-down
'';
};
}