diff --git a/tmux/.tmux.conf b/tmux/.tmux.conf index 9261c2f..e05ccfc 100644 --- a/tmux/.tmux.conf +++ b/tmux/.tmux.conf @@ -1,9 +1,30 @@ #=== KEYBINDINGS ====# -unbind C-b -set -g prefix C-x -bind C-x send-prefix -# Create new session +# change prefix +unbind C-b +set -g prefix C-a +bind C-a send-prefix + +# split panes using | and - +bind | split-window -h +bind - split-window -v +unbind '"' +unbind % + +# 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 + +# switch windows using Alt- without prefix +bind-key -n M-1 select-window -t 1 +bind-key -n M-2 select-window -t 2 +bind-key -n M-3 select-window -t 3 +bind-key -n M-4 select-window -t 4 +bind-key -n M-5 select-window -t 5 + +# Other session shortcuts bind S command-prompt -p "New Session:" "new-session -A -s '%%'" bind K confirm kill-session set-option -g detach-on-destroy off @@ -12,7 +33,10 @@ set-option -g detach-on-destroy off set -g renumber-window on set -g base-index 1 setw -g pane-base-index 1 -bind c new-window -c "#{pane_current_path}" +bind c new-window -c '#{pane_current_path}' + +# Enable mouse control (clickable windows, panes, resizable panes) +set -g mouse on # Fix Tmux for colors set-option -a terminal-features 'foot:RGB' @@ -51,15 +75,12 @@ set -ga status-left "#[bg=#{@thm_bg},fg=#{@thm_yellow}]#{?window_zoomed_flag, # status right look and feel set -g status-right-length 100 set -g status-right "" -# set -ga status-right "#{?#{e|>=:10,#{battery_percentage}},#{#[bg=#{@thm_red},fg=#{@thm_bg}]},#{#[bg=#{@thm_bg},fg=#{@thm_pink}]}} #{battery_icon} #{battery_percentage} " -# set -ga status-right "#[bg=#{@thm_bg},fg=#{@thm_overlay_0}, none]│" set -g status-right '#(gitmux "#{pane_current_path}") ' set -ga status-right "#[bg=#{@thm_bg},fg=#{@thm_overlay_0}, none]│" set -ga status-right "#[bg=#{@thm_bg},fg=#{@thm_blue}] #H" set -g status-position top set -g status-style "bg=#{@thm_bg}" -set -g status-justify "absolute-centre" # pane border look and feel setw -g pane-border-status top