greenhouse

kore

my public infrastructure monorepo

git clone [email protected]:kore.git

kore / home / features / cli / tmux.nix43 lines · 1383B · raw

1{ outputs, ... }:
2
3let
4  c = outputs.palette.colors;
5in {
6  programs.tmux = {
7    enable = true;
8
9    prefix = "C-x";
10    terminal = "tmux-256color";
11    keyMode = "vi";
12    mouse = true;
13    baseIndex = 1;
14    escapeTime = 0;
15    focusEvents = true;
16
17    extraConfig = ''
18      set -as terminal-features ",foot*:RGB"
19      set -g renumber-windows on
20      setw -g automatic-rename on
21      set -g set-titles on
22      set -g set-titles-string "#{pane_title}"
23
24      set -g status-position bottom
25      set -g status-justify left
26      set -g status-style "bg=${c.bg},fg=${c.fg}"
27      set -g status-left-length 30
28      set -g status-left "#[fg=${c.green}]#{session_name}  "
29      set -g status-right "#{?client_prefix,#[fg=${c.yellow}]prefix ,}#{?#{SSH_CONNECTION},#[fg=${c.dim}]#{host_short} ,}"
30      setw -g window-status-format "#[fg=${c.dim}]#{window_index} #{window_name}"
31      setw -g window-status-current-format "#[fg=${c.fg}]#{window_index} #{window_name}"
32      setw -g window-status-separator "  "
33
34      set -g pane-border-lines single
35      set -g pane-border-style "fg=${c.surface}"
36      set -g pane-active-border-style "fg=${c.green}"
37      set -g message-style "bg=${c.bgAlt},fg=${c.fg}"
38      set -g message-command-style "bg=${c.bgAlt},fg=${c.fg}"
39      set -g mode-style "bg=${c.surface},fg=${c.fg}"
40      setw -g clock-mode-colour "${c.green}"
41    '';
42  };
43}