summaryrefslogtreecommitdiff
path: root/user-profiles/tmux
diff options
context:
space:
mode:
Diffstat (limited to 'user-profiles/tmux')
-rw-r--r--user-profiles/tmux/default.nix26
-rw-r--r--user-profiles/tmux/tmux.conf25
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..1403698d
--- /dev/null
+++ b/user-profiles/tmux/tmux.conf
@@ -0,0 +1,25 @@
1set-option -g history-limit 50000
2set-option -g status-bg black
3set-option -g status-fg white
4set-option -g clock-mode-colour white
5set-option -g clock-mode-style 24
6set-option -g bell-action any
7set-option -g default-shell @zsh@/bin/zsh
8set-option -g update-environment 'DISPLAY SSH_ASKPASS SSH_AUTH_SOCK SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY PROMPT_INFO PATH PGHOST PGLOG'
9set-option -g mouse on
10set-option -g set-clipboard on
11set-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
14if "[[ ''${TERM} =~ 256color || ''${TERM} == fbterm ]]" 'set -g default-terminal tmux-256color'
15
16set-option -g status-right ""
17
18bind / command-prompt "split-window -h 'exec @mandb@/bin/man %%'"
19bind C clock-mode
20bind r respawn-pane -k
21
22bind -n M-Left select-pane -L
23bind -n M-Right select-pane -R
24bind -n M-Up select-pane -U
25bind -n M-Down select-pane -D \ No newline at end of file