From 43c9825e49d25fbd2c19abcdeb8f73aee8be2a4c Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Wed, 14 May 2025 10:50:27 +0200 Subject: ... --- user-profiles/tmux/default.nix | 10 +++++----- user-profiles/tmux/tmux.conf | 9 +++------ 2 files changed, 8 insertions(+), 11 deletions(-) (limited to 'user-profiles/tmux') 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 @@ { userName, pkgs, lib, ... }: { - home-manager.users.${userName} = { + home-manager.users.${userName} = { config, ... }: { programs.tmux = { enable = true; clock24 = true; historyLimit = 50000; + mouse = true; extraConfig = lib.readFile (pkgs.stdenv.mkDerivation { name = "tmux.conf"; src = ./tmux.conf; @@ -13,11 +14,10 @@ phases = [ "installPhase" ]; - inherit (pkgs) zsh; - mandb = pkgs.man-db; - installPhase = '' - substituteAll $src $out + substitute $src $out \ + --subst-var-by zsh ${config.programs.zsh.package} \ + --subst-var-by man ${config.programs.man.package} ''; }); }; 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 @@ -set-option -g history-limit 50000 set-option -g status-bg black set-option -g status-fg white set-option -g clock-mode-colour white -set-option -g clock-mode-style 24 set-option -g bell-action any -set-option -g default-shell @zsh@/bin/zsh +set-option -g default-shell @zsh@ set-option -g update-environment 'DISPLAY SSH_ASKPASS SSH_AUTH_SOCK SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY PROMPT_INFO PATH PGHOST PGLOG' -set-option -g mouse on set-option -g set-clipboard on set-option -g terminal-overrides 'rxvt-uni*:XT:Ms=\E]52;%p1%s;%p2%s\007' set-environment -g LESS " -R " ## determine if we should enable 256-colour support -if "[[ ''${TERM} =~ 256color || ''${TERM} == fbterm || ''${TERM} =~ alacritty ]]" 'set -g default-terminal tmux-256color' +if "[[ ''${TERM} =~ 256color || ''${TERM} == fbterm || ''${TERM} =~ alacritty || ''${TERM} =~ kitty ]]" 'set -g default-terminal tmux-256color' set-option -g status-right "" -bind / command-prompt "split-window -h 'exec @mandb@/bin/man %%'" +bind / command-prompt "split-window -h 'exec @man@ %%'" bind C clock-mode bind r switch-client -r -- cgit v1.2.3