summaryrefslogtreecommitdiff
path: root/modules/tmux.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/tmux.nix')
-rw-r--r--modules/tmux.nix52
1 files changed, 52 insertions, 0 deletions
diff --git a/modules/tmux.nix b/modules/tmux.nix
new file mode 100644
index 0000000..a049d39
--- /dev/null
+++ b/modules/tmux.nix
@@ -0,0 +1,52 @@
1{ config, pkgs, ... }:
2
3{
4 programs.tmux = {
5 enable = true;
6 extraConfig = ''
7 set -g default-terminal "xterm-256color"
8 set -g history-limit 50000
9 set -g base-index 1
10 set -s escape-time 0
11 set -g mouse on
12 set-option -g prefix C-a
13 unbind-key C-b
14 bind-key C-a send-prefix
15 bind h select-pane -L
16 bind j select-pane -D
17 bind k select-pane -U
18 bind l select-pane -R
19 bind r source-file ~/.tmux.conf
20
21 # Enable vi keys.
22 setw -g mode-keys vi
23
24 # Escape turns on copy mode
25 bind Escape copy-mode
26
27 # v in copy mode starts making selection
28 bind-key -T copy-mode v send -X begin-selection
29 bind-key -T copy-mode y send -X copy-selection
30
31 # make Prefix p paste the buffer.
32 unbind p
33 bind p paste-buffer
34
35 set-option -g status-position top
36 set -g pane-border-style fg=colour8
37 set -g pane-active-border-style fg=colour8
38
39 set -g status-justify right
40 set -g status-right ""
41 set -g status-left ""
42 set -g status-style "bg=default"
43 set -ag status-style "fg=colour7"
44
45 set -g window-status-current-format "#[fg=colour15] #W"
46 set -g window-status-format "#[fg=colour8] #W"
47
48 set -g status-left-length 100
49 set -ag status-left "#[fg=colour8]time #[fg=colour15]#(date +"%I:%M%p") "
50 '';
51 };
52}