Add home/.tmux.conf
Add home/.tmux.conf.local Change attributes of home/.tmux/.keep
This commit is contained in:
parent
4ab850d872
commit
15e2b04f41
125
home/dot_tmux.conf
Normal file
125
home/dot_tmux.conf
Normal file
@ -0,0 +1,125 @@
|
|||||||
|
# File : .tmux.conf
|
||||||
|
# Author : Jeff LANCE <email@jefflance.me>
|
||||||
|
# Date : 25.06.2021
|
||||||
|
# Last Modified Date: 27.06.2021
|
||||||
|
# Last Modified By : Jeff LANCE <email@jefflance.me>
|
||||||
|
|
||||||
|
# -- general -------------------------------------------------------------------
|
||||||
|
|
||||||
|
set -g default-terminal "alacritty"
|
||||||
|
setw -g xterm-keys on
|
||||||
|
|
||||||
|
set -s escape-time 0 # address vim mode switching delay (http://superuser.com/a/252717/65504)
|
||||||
|
set -g repeat-time 600 # increase repeat timeout
|
||||||
|
set -g focus-events on
|
||||||
|
|
||||||
|
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 50000 # boost history
|
||||||
|
|
||||||
|
set -g status-keys emacs # emacs key bindings in tmux command prompt (prefix + :) are better than
|
||||||
|
# vi keys, even for vim users
|
||||||
|
|
||||||
|
setw -g aggressive-resize on # super useful when using "grouped sessions" and multi-monitor setup
|
||||||
|
|
||||||
|
|
||||||
|
# edit configuration
|
||||||
|
bind e new-window -n "~/.tmux.conf" "EDITOR=\${EDITOR//mvim/vim} && EDITOR=\${EDITOR//gvim/vim} && \${EDITOR:-vim} ~/.tmux.conf && tmux source ~/.tmux.conf && tmux display \"~/.tmux.conf sourced\""
|
||||||
|
|
||||||
|
# reload configuration
|
||||||
|
bind r source-file ~/.tmux.conf \; display '~/.tmux.conf reloaded'
|
||||||
|
|
||||||
|
|
||||||
|
# -- 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 4000 # slightly longer status messages display time
|
||||||
|
|
||||||
|
set -g status-interval 5 # redraw status line every 10 seconds
|
||||||
|
|
||||||
|
# clear both screen and history
|
||||||
|
bind -n C-l send-keys C-l \; run 'sleep 0.1' \; clear-history\; display 'screen and history cleared'
|
||||||
|
|
||||||
|
# activity
|
||||||
|
set -g monitor-activity on
|
||||||
|
set -g visual-activity off
|
||||||
|
|
||||||
|
|
||||||
|
# -- navigation ----------------------------------------------------------------
|
||||||
|
|
||||||
|
# create session
|
||||||
|
bind C-c new-session
|
||||||
|
|
||||||
|
# find session
|
||||||
|
bind C-f command-prompt -p find-session 'switch-client -t %%'
|
||||||
|
|
||||||
|
# split current window horizontally
|
||||||
|
bind - split-window -v
|
||||||
|
# split current window vertically
|
||||||
|
bind | split-window -h
|
||||||
|
|
||||||
|
# pane navigation
|
||||||
|
unbind h
|
||||||
|
unbind j
|
||||||
|
unbind k
|
||||||
|
unbind l
|
||||||
|
bind -n C-Left select-pane -L
|
||||||
|
bind -n C-Right select-pane -R
|
||||||
|
bind -n C-Up select-pane -U
|
||||||
|
bind -n C-Down select-pane -D
|
||||||
|
# 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 -n C-S-PageDown swap-pane -D # swap current pane with the next one
|
||||||
|
bind -n C-S-PageUp swap-pane -U # swap current pane with the previous one
|
||||||
|
|
||||||
|
# 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 -n C-PageUp previous-window # select previous window
|
||||||
|
bind -n C-PageDown next-window # select next window
|
||||||
|
bind Tab last-window # move to last active window
|
||||||
|
|
||||||
|
|
||||||
|
# -- copy mode -----------------------------------------------------------------
|
||||||
|
|
||||||
|
bind-key Space copy-mode
|
||||||
|
bind -n S-Pageup copy-mode -u
|
||||||
|
bind -n S-Pagedown send-keys PageDown
|
||||||
|
|
||||||
|
bind-key -T copy-mode-vi v send -X begin-selection
|
||||||
|
bind-key -T copy-mode-vi c-v send -X rectangle-toggle
|
||||||
|
bind-key -T copy-mode-vi y send -X copy-selection-and-cancel
|
||||||
|
|
||||||
|
|
||||||
|
# -- buffers -------------------------------------------------------------------
|
||||||
|
|
||||||
|
bind b list-buffers # list paste buffers
|
||||||
|
bind p paste-buffer # paste from the top paste buffer
|
||||||
|
bind P choose-buffer # choose which buffer to paste from
|
||||||
|
|
||||||
|
|
||||||
|
# -- user defined overrides ----------------------------------------------------
|
||||||
|
|
||||||
|
if '[ -f ~/.tmux.conf.local ]' 'source ~/.tmux.conf.local'
|
||||||
|
|
||||||
|
|
80
home/dot_tmux.conf.local
Normal file
80
home/dot_tmux.conf.local
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
# File : .tmux.conf.local
|
||||||
|
# Author : Jeff LANCE <email@jefflance.me>
|
||||||
|
# Date : 25.06.2021
|
||||||
|
# Last Modified Date: 27.06.2021
|
||||||
|
# Last Modified By : Jeff LANCE <email@jefflance.me>
|
||||||
|
|
||||||
|
# -- user customizations -------------------------------------------------------
|
||||||
|
# this is the place to override or undo settings
|
||||||
|
|
||||||
|
# increase history size
|
||||||
|
set -g history-limit 10000
|
||||||
|
|
||||||
|
# start with mouse mode enabled
|
||||||
|
set -g mouse on
|
||||||
|
|
||||||
|
# replace C-b by C-Space instead of using both prefixes
|
||||||
|
set -gu prefix2
|
||||||
|
set -g prefix C-Space
|
||||||
|
bind C-Space send-prefix
|
||||||
|
|
||||||
|
# colored underscores
|
||||||
|
set -as terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m'
|
||||||
|
|
||||||
|
# true-color support
|
||||||
|
set -as terminal-overrides ',alacritty:RGB'
|
||||||
|
|
||||||
|
# keybindings correction for home and end keys as i set the terminal env for tmux to alacritty
|
||||||
|
bind-key -n Home send Escape "OH"
|
||||||
|
bind-key -n End send Escape "OF"
|
||||||
|
|
||||||
|
# move status line to top
|
||||||
|
# set -g status-right '%Y-%m-%d %H:%M #{tmux_mode_indicator}'
|
||||||
|
|
||||||
|
# -- plugins configuration -----------------------------------------------------
|
||||||
|
#
|
||||||
|
set-environment -g TMUX_PLUGIN_MANAGER_PATH '~/.tmux/plugins'
|
||||||
|
|
||||||
|
set -g @tpm_plugins ' \
|
||||||
|
tmux-plugins/tpm \
|
||||||
|
tmux-plugins/tmux-resurrect \
|
||||||
|
tmux-plugins/tmux-continuum \
|
||||||
|
tmux-plugins/tmux-sidebar \
|
||||||
|
tmux-plugins/tmux-yank \
|
||||||
|
odedlaz/tmux-onedark-theme \
|
||||||
|
dracula/tmux \
|
||||||
|
jaclu/tmux-menus \
|
||||||
|
MunifTanjim/tmux-mode-indicator \
|
||||||
|
kenos1/tmux-cht-sh \
|
||||||
|
'
|
||||||
|
|
||||||
|
# set -g @onedark_widgets "#(date +%s)"
|
||||||
|
|
||||||
|
set -g @dracula-refresh-rate 5
|
||||||
|
set -g @dracula-show-fahrenheit false
|
||||||
|
# set -g @dracula-fixed-location "Livry-Gargan"
|
||||||
|
# set -g @dracula-day-month true
|
||||||
|
set -g @dracula-military-time false
|
||||||
|
set -g @dracula-show-timezone true
|
||||||
|
set -g @dracula-time-format "%F %R"
|
||||||
|
set -g @dracula-show-network false
|
||||||
|
set -g @dracula-show-powerline true
|
||||||
|
set -g @dracula-show-battery false
|
||||||
|
set -g @dracula-show-left-icon session
|
||||||
|
set -g status-right 'Continuum status: #{continuum_status}'
|
||||||
|
set -g @continuum-boot 'on'
|
||||||
|
|
||||||
|
run '~/.tmux/plugins/tpm/tpm'
|
||||||
|
|
||||||
|
|
||||||
|
# -- startup customizations -----------------------------------------------------
|
||||||
|
#
|
||||||
|
|
||||||
|
# make tmux works with ssh-agent
|
||||||
|
set -g update-environment "DISPLAY SSH_ASKPASS \
|
||||||
|
SSH_AGENT_PID \
|
||||||
|
SSH_CONNECTION WINDOWID XAUTHORITY"
|
||||||
|
setenv -g SSH_AUTH_SOCK "/run/user/1000/keyring/ssh"
|
||||||
|
|
||||||
|
# start with a new session
|
||||||
|
new-session -s jeff
|
Loading…
x
Reference in New Issue
Block a user