custom-hypr - up to date
This commit is contained in:
@@ -1,32 +1,24 @@
|
||||
set -g default-terminal "tmux-256color"
|
||||
set -ag terminal-overrides ",xterm-256color:RGB"
|
||||
# set -g default-terminal "screen-256color"
|
||||
|
||||
set-option -g focus-events on
|
||||
|
||||
set -g prefix C-b
|
||||
# unbind C-b
|
||||
bind-key C-b send-prefix
|
||||
# -- general -------------------------------------------------------------------
|
||||
|
||||
unbind %
|
||||
bind | split-window -h -c "#{pane_current_path}"
|
||||
|
||||
unbind '"'
|
||||
bind - split-window -v -c "#{pane_current_path}"
|
||||
|
||||
unbind r
|
||||
bind r source-file ~/.tmux.conf
|
||||
|
||||
bind j resize-pane -D 5
|
||||
bind k resize-pane -U 5
|
||||
bind l resize-pane -R 5
|
||||
bind h resize-pane -L 5
|
||||
|
||||
bind -r m resize-pane -Z
|
||||
|
||||
set -g mouse on
|
||||
setw -g xterm-keys on
|
||||
set -s escape-time 10 # faster command sequences
|
||||
set -sg repeat-time 500 # increase repeat timeout
|
||||
set -s focus-events on
|
||||
|
||||
set-window-option -g mode-keys vi
|
||||
set -g prefix2 C-b # GNU-Screen compatible prefix
|
||||
bind C-b send-prefix -2
|
||||
|
||||
set -q -g status-utf8 on # expect UTF-8 (tmux < 2.2)
|
||||
setw -q -g utf8 on
|
||||
|
||||
set -g history-limit 5000 # boost history
|
||||
|
||||
bind-key -T copy-mode-vi 'v' send -X begin-selection # start selecting text with "v"
|
||||
bind-key -T copy-mode-vi 'y' send -X copy-selection # copy text with "y"
|
||||
@@ -36,6 +28,97 @@ unbind -T copy-mode-vi MouseDragEnd1Pane # don't exit copy mode when dragging wi
|
||||
# remove delay for exiting insert mode with ESC in Neovim
|
||||
set -sg escape-time 10
|
||||
|
||||
# edit configuration
|
||||
%if #{>=:#{version},3.0}
|
||||
bind e new-window -n "#{TMUX_CONF_LOCAL}" -e EDITOR="$EDITOR" sh -c 'case "${EDITOR:-vim}" in *vim*) ${EDITOR:-vim} -c ":set syntax=tmux" "$TMUX_CONF_LOCAL";; *) $EDITOR "$TMUX_CONF_LOCAL";; esac && "$TMUX_PROGRAM" ${TMUX_SOCKET:+-S "$TMUX_SOCKET"} source "$TMUX_CONF" \; display "$TMUX_CONF_LOCAL sourced"'
|
||||
%else
|
||||
set-environment -g EDITOR "$EDITOR"
|
||||
bind e new-window -n "#{TMUX_CONF_LOCAL}" sh -c 'case "${EDITOR:-vim}" in *vim*) ${EDITOR:-vim} -c ":set syntax=tmux" "$TMUX_CONF_LOCAL";; *) $EDITOR "$TMUX_CONF_LOCAL";; esac && "$TMUX_PROGRAM" ${TMUX_SOCKET:+-S "$TMUX_SOCKET"} source "$TMUX_CONF" \; display "$TMUX_CONF_LOCAL sourced"'
|
||||
%endif
|
||||
|
||||
# reload configuration
|
||||
bind r run "sh -c '\"\$TMUX_PROGRAM\" \${TMUX_SOCKET:+-S \"\$TMUX_SOCKET\"} source \"\$TMUX_CONF\"'" \; display "#{TMUX_CONF} sourced"
|
||||
|
||||
set-window-option -g mode-keys vi
|
||||
|
||||
# -- display -------------------------------------------------------------------
|
||||
|
||||
set -g base-index 1 # start windows numbering at 1
|
||||
setw -g pane-base-index 1 # make pane numbering consistent with windows
|
||||
|
||||
setw -g automatic-rename on # rename window to reflect current program
|
||||
set -g renumber-windows on # renumber windows when a window is closed
|
||||
|
||||
set -g set-titles on # set terminal title
|
||||
|
||||
set -g display-panes-time 800 # slightly longer pane indicators display time
|
||||
set -g display-time 1000 # slightly longer status messages display time
|
||||
|
||||
set -g status-interval 10 # redraw status line every 10 seconds
|
||||
|
||||
# activity
|
||||
set -g monitor-activity on
|
||||
set -g visual-activity off
|
||||
|
||||
set -g monitor-activity off
|
||||
set -g bell-action none
|
||||
set -g visual-bell off
|
||||
# -- navigation ----------------------------------------------------------------
|
||||
|
||||
# create session
|
||||
# bind C-c new-session
|
||||
|
||||
# find session
|
||||
bind C-f command-prompt -p find-session 'switch-client -t %%'
|
||||
|
||||
# session navigation
|
||||
bind BTab switch-client -l # move to last session
|
||||
|
||||
# split current window horizontally
|
||||
bind - split-window -v -c "#{pane_current_path}"
|
||||
# split current window vertically
|
||||
bind _ split-window -h -c "#{pane_current_path}"
|
||||
|
||||
# pane navigation
|
||||
bind -r h select-pane -L # move left
|
||||
bind -r j select-pane -D # move down
|
||||
bind -r k select-pane -U # move up
|
||||
bind -r l select-pane -R # move right
|
||||
bind C-q swap-pane -D # swap current pane with the next one
|
||||
bind C-e swap-pane -U # swap current pane with the previous one
|
||||
|
||||
# maximize current pane
|
||||
bind + run "cut -c3- '#{TMUX_CONF}' | sh -s _maximize_pane '#{session_name}' '#D'"
|
||||
|
||||
# pane resizing
|
||||
bind -r H resize-pane -L 2
|
||||
bind -r J resize-pane -D 2
|
||||
bind -r K resize-pane -U 2
|
||||
bind -r L resize-pane -R 2
|
||||
|
||||
# window navigation
|
||||
unbind n
|
||||
unbind p
|
||||
bind -r C-h previous-window # select previous window
|
||||
bind -r C-l next-window # select next window
|
||||
bind Tab last-window # move to last active window
|
||||
|
||||
|
||||
# -- copy mode -----------------------------------------------------------------
|
||||
|
||||
bind Enter copy-mode # enter copy mode
|
||||
|
||||
bind -T copy-mode-vi v send -X begin-selection
|
||||
bind -T copy-mode-vi C-v send -X rectangle-toggle
|
||||
bind -T copy-mode-vi y send -X copy-selection-and-cancel
|
||||
bind -T copy-mode-vi Escape send -X cancel
|
||||
bind -T copy-mode-vi H send -X start-of-line
|
||||
bind -T copy-mode-vi L send -X end-of-line
|
||||
|
||||
|
||||
|
||||
|
||||
# NOTE: --------------------------------------------------------------------------------------------------------------------
|
||||
# tpm plugin
|
||||
set -g @plugin 'catppuccin/tmux'
|
||||
# set -g @plugin 'xamut/tmux-weather'
|
||||
@@ -76,8 +159,8 @@ set -g @catppuccin_window_status_icon_enable "yes"
|
||||
set -g @catppuccin_window_status_enable "yes"
|
||||
set -g @catppuccin_status_default "on"
|
||||
# icons
|
||||
set -g @catppuccin_icon_window_last " "
|
||||
set -g @catppuccin_icon_window_current " "
|
||||
set -g @catppuccin_icon_window_last " "
|
||||
set -g @catppuccin_icon_window_current " "
|
||||
|
||||
set -g status-position top
|
||||
|
||||
|
||||
Reference in New Issue
Block a user