From fe963b2eb6d970f520ed0b3db599229f2cb70027 Mon Sep 17 00:00:00 2001 From: Jason Hilder Date: Tue, 21 Apr 2026 07:58:50 +0200 Subject: [PATCH] Added tmux and tmux config --- config/tmux/.tmux.conf | 60 ++++++++++++++++++++++++++++++++++++++++++ install.sh | 3 ++- 2 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 config/tmux/.tmux.conf diff --git a/config/tmux/.tmux.conf b/config/tmux/.tmux.conf new file mode 100644 index 0000000..b5b7bee --- /dev/null +++ b/config/tmux/.tmux.conf @@ -0,0 +1,60 @@ +# Terminal colors +set -g default-terminal "screen-256color" +set -ga terminal-overrides ',xterm-256color:Tc' +set -g mouse on +set -g base-index 1 +set -g pane-base-index 1 +set -sg escape-time 0 + +# remap prefix from 'C-b' to 'C-f' +unbind l +unbind C-b +set-option -g prefix C-f +bind-key C-f send-prefix + +# reload config file +bind r source-file ~/.tmux.conf + +# switch panes using Alt-arrow without prefix +setw -g mode-keys vi +bind -n C-h select-pane -L +bind -n C-l select-pane -R +bind -n C-k select-pane -U +bind -n C-j select-pane -D + +bind -n C-p previous-window +bind -n C-n next-window + +bind h select-pane -L +bind l select-pane -R +bind k select-pane -U +bind j select-pane -D +bind f resize-pane -Z + +# Select windows with alt+num +bind-key -n M-1 selectw -t 1 +bind-key -n M-2 selectw -t 2 +bind-key -n M-3 selectw -t 3 +bind-key -n M-4 selectw -t 3 +bind-key -n M-5 selectw -t 3 + +bind m command-prompt "new-session -s %1" + +# split panes using | and - +bind o split-window -h -l 40% -c "#{pane_current_path}" +bind v split-window -v -l 35% -c "#{pane_current_path}" +unbind '"' +unbind % + +## STATUS BAR ################################################################## + +## Status bar design +set -g status-justify centre +set -g status-position top +set -g status-bg '#181616' +set -g status-fg '#c5c9c5' + +## Show PREFIX on right side when c-b +set -g status-left '#[fg=colour232,bg="#af875f",bold]#{?client_prefix, ,}#[fg="#1c1c1c",bg="#767676",bold][#S] ' +set -g status-left-length 20 +set -g status-right '' diff --git a/install.sh b/install.sh index ecb6b2c..f77fb4c 100755 --- a/install.sh +++ b/install.sh @@ -130,6 +130,7 @@ if [ "$DO_LINKS" = true ]; then link_file "$DOTFILES_DIR/config/foot" "$HOME/.config/foot" link_file "$DOTFILES_DIR/config/nvim" "$HOME/.config/nvim" link_file "$DOTFILES_DIR/config/gitu" "$HOME/.config/gitu" + link_file "$DOTFILES_DIR/config/tmux/.tmux.conf" "$HOME/.tmux.conf" link_file "$DOTFILES_DIR/config/gtk3/gtk.css" "$HOME/.config/gtk-3.0/gtk.css" link_file "$DOTFILES_DIR/config/gtk4/gtk.css" "$HOME/.config/gtk-4.0/gtk.css" @@ -160,7 +161,7 @@ if [ "$DO_INSTALL" = true ]; then wget curl git unzip fzf fd-find btop direnv ripgrep tree bat build-essential make bear valgrind fish - ca-certificates gnupg libfuse2 + tmux ca-certificates gnupg libfuse2 ) MISSING_PACKAGES=()