diff --git a/modules/home-manager/default.nix b/modules/home-manager/default.nix index 779662f..5674acf 100755 --- a/modules/home-manager/default.nix +++ b/modules/home-manager/default.nix @@ -13,6 +13,7 @@ ./kdeconnect ./vs-code ./bitwarden + ./tmux ]; nixpkgs = { diff --git a/modules/home-manager/tmux/default.nix b/modules/home-manager/tmux/default.nix new file mode 100644 index 0000000..65e76d9 --- /dev/null +++ b/modules/home-manager/tmux/default.nix @@ -0,0 +1,49 @@ +{ pkgs, ... }: { + + programs.tmux = { + enable = true; + plugins = with pkgs;[ + { + plugin = tmuxPlugins.gruvbox; + extraConfig = "set -g @tmux-gruvbox 'dark'"; + } + { + plugin = tmuxPlugins.power-theme; + extraConfig = "set -g @tmux_power_theme 'gold'"; + } + ]; + extraConfig = " + + set -g mouse on + set-option -g status-position top + set-option -g allow-rename off + unbind r + bind r source-file ~/.config/tmux/tmux.conf + + # remap prefix from C-b to C-Space + unbind C-b + set -g prefix C-Space + bind C-Space send-prefix + + # split panes using | and - + unbind '\"' + unbind % + bind | split-window -h + bind - split-window -v + + # Start windows and panes at 1, not 0 + set -g base-index 1 + set -g pane-base-index 1 + set-window-option -g pane-base-index 1 + set-option -g renumber-windows on + + # switch panes using Alt-arrow without prefix + bind -n M-Left select-pane -L + bind -n M-Right select-pane -R + bind -n M-Up select-pane -U + bind -n M-Down select-pane -D + + "; + }; + +}