From 5b1e63421dce650cfa6cabae4fbc7ea7a8842d65 Mon Sep 17 00:00:00 2001 From: Ahwx Date: Fri, 21 Jun 2024 10:31:44 +0200 Subject: [PATCH] feat: adds tmux config --- modules/home/tmux.nix | 58 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 modules/home/tmux.nix diff --git a/modules/home/tmux.nix b/modules/home/tmux.nix new file mode 100644 index 0000000..c34bf28 --- /dev/null +++ b/modules/home/tmux.nix @@ -0,0 +1,58 @@ +{ inputs, lib, config, pkgs, ... }: +{ + home.packages = with pkgs; [ + tmux + ]; + programs.tmux = { + enable = true; + sensibleOnTop = false; + extraConfig = '' + set -g default-terminal "xterm-256color" + set -ag terminal-overrides ",xterm-256color:RGB" + set-option -g default-shell ${pkgs.zsh}/bin/zsh + set -g status-keys vi + + + set-window-option -g mode-keys vi + bind h select-pane -L + bind j select-pane -D + bind k select-pane -U + bind l select-pane -R + + bind-key x kill-pane + + set -g set-titles-string ' #{pane_title} ' + + set -g mouse on + set-option -g visual-activity off + set-option -g visual-bell off + set-option -g visual-silence off + set-window-option -g monitor-activity off + set-window-option -g mode-style bg=0,fg=default,noreverse + set-window-option -g window-status-current-style bg=green,fg=black + setw -g window-status-format " #I:#W#F " + setw -g window-status-current-format " #I:#W#F " + set-window-option -g window-status-style fg=green + set-option -g renumber-windows on + + bind-key r source-file ~/.tmux.conf \; display-message "tmux.conf reloaded." + + set-option -g bell-action none + set -g status-position bottom + set -g status-justify left + set -g status-bg colour8 + set -g status-fg blue + set -g status-right ' #(cd #{pane_current_path}; git rev-parse --abbrev-ref HEAD)  #{=50:pane_current_path} %b %d %H:%M ' + set -g status-right-length 200 + set -g status-left ''' + set -sg escape-time 0 + + set -g base-index 1 + setw -g pane-base-index 1 + set -g pane-border-format " #P: #{pane_current_command} " + ''; + plugins = with pkgs.tmuxPlugins; [ + yank + ]; + }; +}