diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2025-05-14 10:50:27 +0200 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2025-05-14 10:50:27 +0200 |
commit | 43c9825e49d25fbd2c19abcdeb8f73aee8be2a4c (patch) | |
tree | c1cc8a034395c9bb8188651f6835922b38887f32 /user-profiles/tmux | |
parent | 03d49aa8ec6f51c8f51bfb628e614ac537cca8e0 (diff) | |
download | nixos-43c9825e49d25fbd2c19abcdeb8f73aee8be2a4c.tar nixos-43c9825e49d25fbd2c19abcdeb8f73aee8be2a4c.tar.gz nixos-43c9825e49d25fbd2c19abcdeb8f73aee8be2a4c.tar.bz2 nixos-43c9825e49d25fbd2c19abcdeb8f73aee8be2a4c.tar.xz nixos-43c9825e49d25fbd2c19abcdeb8f73aee8be2a4c.zip |
...
Diffstat (limited to 'user-profiles/tmux')
-rw-r--r-- | user-profiles/tmux/default.nix | 10 | ||||
-rw-r--r-- | user-profiles/tmux/tmux.conf | 9 |
2 files changed, 8 insertions, 11 deletions
diff --git a/user-profiles/tmux/default.nix b/user-profiles/tmux/default.nix index 11c53788..dc4e791f 100644 --- a/user-profiles/tmux/default.nix +++ b/user-profiles/tmux/default.nix | |||
@@ -1,10 +1,11 @@ | |||
1 | { userName, pkgs, lib, ... }: | 1 | { userName, pkgs, lib, ... }: |
2 | { | 2 | { |
3 | home-manager.users.${userName} = { | 3 | home-manager.users.${userName} = { config, ... }: { |
4 | programs.tmux = { | 4 | programs.tmux = { |
5 | enable = true; | 5 | enable = true; |
6 | clock24 = true; | 6 | clock24 = true; |
7 | historyLimit = 50000; | 7 | historyLimit = 50000; |
8 | mouse = true; | ||
8 | extraConfig = lib.readFile (pkgs.stdenv.mkDerivation { | 9 | extraConfig = lib.readFile (pkgs.stdenv.mkDerivation { |
9 | name = "tmux.conf"; | 10 | name = "tmux.conf"; |
10 | src = ./tmux.conf; | 11 | src = ./tmux.conf; |
@@ -13,11 +14,10 @@ | |||
13 | 14 | ||
14 | phases = [ "installPhase" ]; | 15 | phases = [ "installPhase" ]; |
15 | 16 | ||
16 | inherit (pkgs) zsh; | ||
17 | mandb = pkgs.man-db; | ||
18 | |||
19 | installPhase = '' | 17 | installPhase = '' |
20 | substituteAll $src $out | 18 | substitute $src $out \ |
19 | --subst-var-by zsh ${config.programs.zsh.package} \ | ||
20 | --subst-var-by man ${config.programs.man.package} | ||
21 | ''; | 21 | ''; |
22 | }); | 22 | }); |
23 | }; | 23 | }; |
diff --git a/user-profiles/tmux/tmux.conf b/user-profiles/tmux/tmux.conf index 415d13e7..9e658800 100644 --- a/user-profiles/tmux/tmux.conf +++ b/user-profiles/tmux/tmux.conf | |||
@@ -1,23 +1,20 @@ | |||
1 | set-option -g history-limit 50000 | ||
2 | set-option -g status-bg black | 1 | set-option -g status-bg black |
3 | set-option -g status-fg white | 2 | set-option -g status-fg white |
4 | set-option -g clock-mode-colour white | 3 | set-option -g clock-mode-colour white |
5 | set-option -g clock-mode-style 24 | ||
6 | set-option -g bell-action any | 4 | set-option -g bell-action any |
7 | set-option -g default-shell @zsh@/bin/zsh | 5 | set-option -g default-shell @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' | 6 | 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 | 7 | set-option -g set-clipboard on |
11 | set-option -g terminal-overrides 'rxvt-uni*:XT:Ms=\E]52;%p1%s;%p2%s\007' | 8 | set-option -g terminal-overrides 'rxvt-uni*:XT:Ms=\E]52;%p1%s;%p2%s\007' |
12 | 9 | ||
13 | set-environment -g LESS " -R " | 10 | set-environment -g LESS " -R " |
14 | 11 | ||
15 | ## determine if we should enable 256-colour support | 12 | ## determine if we should enable 256-colour support |
16 | if "[[ ''${TERM} =~ 256color || ''${TERM} == fbterm || ''${TERM} =~ alacritty ]]" 'set -g default-terminal tmux-256color' | 13 | if "[[ ''${TERM} =~ 256color || ''${TERM} == fbterm || ''${TERM} =~ alacritty || ''${TERM} =~ kitty ]]" 'set -g default-terminal tmux-256color' |
17 | 14 | ||
18 | set-option -g status-right "" | 15 | set-option -g status-right "" |
19 | 16 | ||
20 | bind / command-prompt "split-window -h 'exec @mandb@/bin/man %%'" | 17 | bind / command-prompt "split-window -h 'exec @man@ %%'" |
21 | bind C clock-mode | 18 | bind C clock-mode |
22 | bind r switch-client -r | 19 | bind r switch-client -r |
23 | 20 | ||