1
Fork 0

Add tmux configuration

This commit is contained in:
caem 2024-11-24 12:29:59 +01:00
parent 5f0b6270d5
commit c0fa670037
Signed by: caem
GPG key ID: 69A830D03203405F
4 changed files with 30 additions and 15 deletions

View file

@ -1,9 +0,0 @@
#!/usr/bin/env zsh
# Disabled until I fix my tmux config
return
if [ "$TERM" = "xterm-256color" ] && [ -x "$(command -v tmux)" ]; then
tmux new-session
fi

View file

@ -17,6 +17,7 @@
../../modules/packages/firefox.nix ../../modules/packages/firefox.nix
../../modules/packages/zsh.nix ../../modules/packages/zsh.nix
../../modules/packages/fastfetch.nix ../../modules/packages/fastfetch.nix
../../modules/packages/tmux.nix
]; ];
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;

View file

@ -15,6 +15,7 @@
../../modules/packages/firefox.nix ../../modules/packages/firefox.nix
../../modules/packages/zsh.nix ../../modules/packages/zsh.nix
../../modules/packages/fastfetch.nix ../../modules/packages/fastfetch.nix
../../modules/packages/tmux.nix
]; ];
boot = { boot = {

View file

@ -1,16 +1,38 @@
{ ... }: { pkgs, ... }:
{ {
# TODO: Port changes over from dots and streamline workflow
programs.tmux = { programs.tmux = {
enable = true; enable = true;
prefix = "C-Space";
customPaneNavigationAndResize = true; customPaneNavigationAndResize = true;
baseIndex = 1; baseIndex = 1;
plugins = with pkgs; [
tmuxPlugins.resurrect
];
extraConfig = '' extraConfig = ''
bind v split-window -v # Neovim
bind c split-window -h set-option -sg escape-time 10
bind n new-window set-option -g focus-events on
# vi mode
set -g mode-keys vi
set -g status-keys vi
# Rebind prefix key to C-a
set -g prefix C-a
bind C-a send-prefix
unbind C-b
# Clipboard
set -ga update-environment WAYLAND_DISPLAY
bind Escape copy-mode
bind p run-shell 'tmux set-buffer -- "$(wl-paste -t "text/plain;charset=utf-8")"; tmux paste-buffer'
bind -T copy-mode-vi 'v' send -X begin-selection
bind -T copy-mode-vi 'y' send -X copy-pipe 'wl-copy'
set -s set-clipboard off
# Status bar
set -g status-style bg=default
set -g status-fg 4
''; '';
}; };
} }