2021-06-25 09:18:49 +00:00
|
|
|
# File : .tmux.conf.local
|
|
|
|
# Author : Jeff LANCE <email@jefflance.me>
|
|
|
|
# Date : 25.06.2021
|
2021-06-27 20:20:03 +00:00
|
|
|
# Last Modified Date: 27.06.2021
|
2021-06-25 09:18:49 +00:00
|
|
|
# Last Modified By : Jeff LANCE <email@jefflance.me>
|
2020-10-24 15:39:43 +00:00
|
|
|
|
|
|
|
# -- navigation ----------------------------------------------------------------
|
|
|
|
|
|
|
|
# if you're running tmux within iTerm2
|
|
|
|
# - and tmux is 1.9 or 1.9a
|
|
|
|
# - and iTerm2 is configured to let option key act as +Esc
|
|
|
|
# - and iTerm2 is configured to send [1;9A -> [1;9D for option + arrow keys
|
|
|
|
# then uncomment the following line to make Meta + arrow keys mapping work
|
|
|
|
#set -ga terminal-overrides "*:kUP3=\e[1;9A,*:kDN3=\e[1;9B,*:kRIT3=\e[1;9C,*:kLFT3=\e[1;9D"
|
|
|
|
|
|
|
|
|
|
|
|
# -- user customizations -------------------------------------------------------
|
|
|
|
# this is the place to override or undo settings
|
|
|
|
|
|
|
|
# increase history size
|
2021-01-27 20:40:04 +00:00
|
|
|
set -g history-limit 10000
|
2020-10-24 15:39:43 +00:00
|
|
|
|
|
|
|
# start with mouse mode enabled
|
2021-01-27 20:40:04 +00:00
|
|
|
set -g mouse on
|
2020-10-24 15:39:43 +00:00
|
|
|
|
|
|
|
# force Vi mode
|
|
|
|
# really you should export VISUAL or EDITOR environment variable, see manual
|
|
|
|
#set -g status-keys vi
|
|
|
|
#set -g mode-keys vi
|
|
|
|
|
|
|
|
# replace C-b by C-a instead of using both prefixes
|
2021-04-10 16:17:14 +00:00
|
|
|
set -gu prefix2
|
|
|
|
unbind C-a
|
|
|
|
unbind C-b
|
|
|
|
set -g prefix C-a
|
2021-01-27 20:40:04 +00:00
|
|
|
bind C-a send-prefix
|
2020-10-24 15:39:43 +00:00
|
|
|
|
|
|
|
# move status line to top
|
2022-01-26 20:16:49 +00:00
|
|
|
# set -g status-right '%Y-%m-%d %H:%M #{tmux_mode_indicator}'
|
2020-10-24 15:39:43 +00:00
|
|
|
|
2023-04-12 12:48:28 +00:00
|
|
|
# is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
|
|
|
|
# | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
|
|
|
|
|
|
|
|
# is_fzf="ps -o state= -o comm= -t '#{pane_tty}' \
|
|
|
|
# | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?fzf$'"
|
|
|
|
|
|
|
|
# bind -n C-h run "($is_vim && tmux send-keys C-h) || tmux select-pane -L"
|
|
|
|
|
|
|
|
# bind -n C-j run "($is_vim && tmux send-keys C-j) || \
|
|
|
|
# ($is_fzf && tmux send-keys C-j) || \
|
|
|
|
# tmux select-pane -D"
|
|
|
|
|
|
|
|
# bind -n C-k run "($is_vim && tmux send-keys C-k) || \
|
|
|
|
# ($is_fzf && tmux send-keys C-k) || \
|
|
|
|
# tmux select-pane -U"
|
|
|
|
|
|
|
|
# bind -n C-l run "($is_vim && tmux send-keys C-l) || tmux select-pane -R"
|
|
|
|
|
|
|
|
# bind-key -n C-\if-shell "$is_vim" "send-keys C-\\" "select-pane -l"
|
|
|
|
|
2021-07-02 13:26:27 +00:00
|
|
|
|
|
|
|
# -- plugins configuration -----------------------------------------------------
|
|
|
|
#
|
2022-01-26 20:16:49 +00:00
|
|
|
set-environment -g TMUX_PLUGIN_MANAGER_PATH '$HOME/.tmux/plugins'
|
|
|
|
|
|
|
|
set -g @tpm_plugins ' \
|
|
|
|
tmux-plugins/tpm \
|
|
|
|
odedlaz/tmux-onedark-theme \
|
|
|
|
# dracula/tmux \
|
|
|
|
MunifTanjim/tmux-mode-indicator \
|
|
|
|
tmux-plugins/tmux-resurrect \
|
|
|
|
tmux-plugins/tmux-continuum \
|
2021-07-02 13:26:27 +00:00
|
|
|
'
|
2021-06-27 20:20:03 +00:00
|
|
|
|
2022-01-26 20:16:49 +00:00
|
|
|
set -g @onedark_widgets "#(date +%s)"
|
|
|
|
|
|
|
|
# set -g @dracula-refresh-rate 5
|
2022-07-18 15:36:58 +00:00
|
|
|
set -g @dracula-show-fahrenheit false
|
|
|
|
set -g @dracula-fixed-location "Livry-Gargan"
|
2022-01-26 20:16:49 +00:00
|
|
|
# set -g @dracula-day-month true
|
|
|
|
# set -g @dracula-show-powerline true
|
|
|
|
# set -g @dracula-show-network false
|
|
|
|
# set -g @dracula-show-powerline true
|
|
|
|
# set -g @dracula-show-battery false
|
|
|
|
# set -g @dracula-show-timezone false
|
|
|
|
# set -g @dracula-military-time true
|
|
|
|
# set -g @dracula-show-left-icon session
|
|
|
|
|
|
|
|
|
|
|
|
if "test ! -d ~/.tmux/plugins/tpm" \
|
|
|
|
"run 'git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm && ~/.tmux/plugins/tpm/bin/install_plugins'"
|
2021-06-27 20:20:03 +00:00
|
|
|
|
2021-07-02 13:26:27 +00:00
|
|
|
run '~/.tmux/plugins/tpm/tpm'
|
2022-04-23 14:34:32 +00:00
|
|
|
|
2022-07-18 15:36:58 +00:00
|
|
|
|
|
|
|
# -- start customizations -----------------------------------------------------
|
|
|
|
#
|
|
|
|
|
|
|
|
# make tmux works with ssh-agent
|
|
|
|
set -g update-environment "DISPLAY SSH_ASKPASS \
|
2023-04-04 09:38:34 +00:00
|
|
|
SSH_AGENT_PID \
|
2022-07-18 15:36:58 +00:00
|
|
|
SSH_CONNECTION WINDOWID XAUTHORITY"
|
2023-04-04 09:38:34 +00:00
|
|
|
setenv -g SSH_AUTH_SOCK "/run/user/1000/keyring/ssh"
|
2022-07-18 15:36:58 +00:00
|
|
|
|
|
|
|
# start with a new session
|
2022-04-23 14:34:32 +00:00
|
|
|
new-session
|