diff options
Diffstat (limited to 'user-profiles/tmux')
-rw-r--r-- | user-profiles/tmux/default.nix | 26 | ||||
-rw-r--r-- | user-profiles/tmux/tmux.conf | 25 |
2 files changed, 51 insertions, 0 deletions
diff --git a/user-profiles/tmux/default.nix b/user-profiles/tmux/default.nix new file mode 100644 index 00000000..9e66cadd --- /dev/null +++ b/user-profiles/tmux/default.nix | |||
@@ -0,0 +1,26 @@ | |||
1 | { userName, pkgs, lib, ... }: | ||
2 | { | ||
3 | home-manager.users.${userName} = { | ||
4 | programs.tmux = { | ||
5 | enable = true; | ||
6 | clock24 = true; | ||
7 | historyLimit = 50000; | ||
8 | extraConfig = lib.readFile (pkgs.stdenv.mkDerivation { | ||
9 | name = "tmux.conf"; | ||
10 | src = ./tmux.conf; | ||
11 | |||
12 | buildInputs = with pkgs; [ makeWrapper ]; | ||
13 | |||
14 | phases = [ "installPhase" ]; | ||
15 | |||
16 | inherit (pkgs) zsh; | ||
17 | mandb = pkgs.man-db; | ||
18 | |||
19 | installPhase = '' | ||
20 | substituteAll $src $out | ||
21 | ''; | ||
22 | }); | ||
23 | tmuxp.enable = true; | ||
24 | }; | ||
25 | }; | ||
26 | } | ||
diff --git a/user-profiles/tmux/tmux.conf b/user-profiles/tmux/tmux.conf new file mode 100644 index 00000000..f9a3e11f --- /dev/null +++ b/user-profiles/tmux/tmux.conf | |||
@@ -0,0 +1,25 @@ | |||
1 | set-option -g history-limit 50000 | ||
2 | set-option -g status-bg black | ||
3 | set-option -g status-fg white | ||
4 | set-option -g clock-mode-colour white | ||
5 | set-option -g clock-mode-style 24 | ||
6 | set-option -g bell-action any | ||
7 | set-option -g default-shell @zsh@/bin/zsh | ||
8 | set-option -g update-environment 'DISPLAY SSH_ASKPASS SSH_AUTH_SOCK SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY PROMPT_INFO PATH PGHOST PGLOG' | ||
9 | set-option -g mouse on | ||
10 | set-option -g set-clipboard on | ||
11 | set-option -g terminal-overrides 'rxvt-uni*:XT:Ms=\E]52;%p1%s;%p2%s\007' | ||
12 | |||
13 | ## determine if we should enable 256-colour support | ||
14 | if "[[ ''${TERM} =~ 256color || ''${TERM} == fbterm || ''${TERM} =~ alacritty ]]" 'set -g default-terminal tmux-256color' | ||
15 | |||
16 | set-option -g status-right "" | ||
17 | |||
18 | bind / command-prompt "split-window -h 'exec @mandb@/bin/man %%'" | ||
19 | bind C clock-mode | ||
20 | bind r respawn-pane -k | ||
21 | |||
22 | bind -n M-Left select-pane -L | ||
23 | bind -n M-Right select-pane -R | ||
24 | bind -n M-Up select-pane -U | ||
25 | bind -n M-Down select-pane -D \ No newline at end of file | ||