diff options
| author | nsfisis <nsfisis@gmail.com> | 2023-06-18 21:49:04 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2023-09-01 09:25:39 +0900 |
| commit | f1e3ca6f971c2c5177174896e1fa3e6f695ca2a1 (patch) | |
| tree | b31e333930788d70b95869d20a29fef39c0faa35 | |
| parent | 22ddc1d4c1a06694997459f699818f20f2286798 (diff) | |
| download | dotfiles-f1e3ca6f971c2c5177174896e1fa3e6f695ca2a1.tar.gz dotfiles-f1e3ca6f971c2c5177174896e1fa3e6f695ca2a1.tar.zst dotfiles-f1e3ca6f971c2c5177174896e1fa3e6f695ca2a1.zip | |
home-manager: manage tmux
| -rw-r--r-- | home-manager/config/tmux/tmux.conf (renamed from .config/tmux/tmux.conf) | 9 | ||||
| -rw-r--r-- | home-manager/home.nix | 30 | ||||
| -rwxr-xr-x | setup.sh | 1 |
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 + ); + }; } @@ -60,7 +60,6 @@ for name in \ git \ newsboat \ nvim \ - tmux \ ; \ do if [ ! -L ~/.config/"$name" ]; then |
