aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--home-manager/config/tmux/tmux.conf (renamed from .config/tmux/tmux.conf)9
-rw-r--r--home-manager/home.nix30
-rwxr-xr-xsetup.sh1
3 files changed, 32 insertions, 8 deletions
diff --git a/.config/tmux/tmux.conf b/home-manager/config/tmux/tmux.conf
index 6d0535f..e1715cd 100644
--- a/.config/tmux/tmux.conf
+++ b/home-manager/config/tmux/tmux.conf
@@ -10,15 +10,10 @@
# OPTIONS {{{1
# BASICS {{{2
-set-option -g base-index 1
-set-option -g pane-base-index 1
set-option -g renumber-windows on
-set-option -g history-limit 10000
set-option -g focus-events on
-set-option -g escape-time 10
# TERMINAL FEATURES {{{2
-set-option -g default-terminal tmux-256color
set-option -ga terminal-overrides ',tmux-256color:Tc'
set-option -ga terminal-overrides ',alacritty:RGB'
@@ -47,7 +42,6 @@ unbind-key -a -T root
unbind-key -a -T prefix
set-option -g status-keys emacs
-set-option -g prefix C-t
bind-key : command-prompt
bind-key ';' command-prompt
@@ -83,6 +77,7 @@ set-option -g mode-keys vi
bind-key V copy-mode
bind-key -T copy-mode-vi V send-keys -X select-line
bind-key -T copy-mode-vi Escape send-keys -X clear-selection
-bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy"
+# This is configured by home-manager.
+# bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "<clipboard copy command>"
bind-key s set-option synchronize-panes
diff --git a/home-manager/home.nix b/home-manager/home.nix
index c24fb0a..ddbcac9 100644
--- a/home-manager/home.nix
+++ b/home-manager/home.nix
@@ -53,4 +53,34 @@ in
enable = true;
nix-direnv.enable = true;
};
+
+ programs.tmux = {
+ enable = true;
+
+ sensibleOnTop = false;
+
+ aggressiveResize = true;
+ baseIndex = 1;
+ clock24 = true;
+ escapeTime = 0;
+ historyLimit = 50000;
+ mouse = false;
+ prefix = "C-t";
+ terminal = "tmux-256color";
+
+ extraConfig = (
+ let
+ commonConfig = builtins.readFile ./config/tmux/tmux.conf;
+ extraConfig = if isWayland then
+ ''
+ bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "wl-copy"
+ ''
+ else
+ ''
+ bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy"
+ '';
+ in
+ commonConfig + extraConfig
+ );
+ };
}
diff --git a/setup.sh b/setup.sh
index f21acf3..dfbfe0a 100755
--- a/setup.sh
+++ b/setup.sh
@@ -60,7 +60,6 @@ for name in \
git \
newsboat \
nvim \
- tmux \
; \
do
if [ ! -L ~/.config/"$name" ]; then