dotfiles/home/user/.config/tmux/aliases.conf
2024-06-05 14:06:20 +03:00

38 lines
1.3 KiB
Plaintext

# vim: ft=tmux
set -g command-alias[101] kill='kill-session -t'
set -g command-alias[102] k='kill-session -t'
set -g command-alias[103] reload-config='source-file ~/.config/tmux/tmux.conf ; display-message "Config reloaded..."'
set -g command-alias[104] detect-panes='
set -g display-time $_tmux_display_panes_time
display-message
display-panes
set -g display-time $_tmux_display_time
'
set -g command-alias[105] stash-pane='if-shell "tmux join-pane -l $_tmux_main_pane_size -h -s stash" "" "break-pane -d -n stash"'
set -g command-alias[106] detach-other='if -F "#{session_many_attached}" {
confirm-before -p "Detach other clients? (y/n)" "detach -a"
} {
display "Session has only 1 client attached"
}'
set -g command-alias[107] toggle-synchronize-panes='
if -F "#{pane_synchronized}" "setw synchronize-panes off" "setw synchronize-panes on"
'
# Choose session with key index starting from 1
set -g command-alias[108] choose-tree-index="
choose-tree -ZsK '#{?#{e|<:#{line},9},#{e|+:1,#{line}},#{?#{e|<:#{line},35},M-#{a:#{e|+:97,#{e|-:#{line},9}}},}}'
"
set -g command-alias[109] toggle-zoom='resize-pane -Z'
set -g command-alias[110] default-layout="
resize-pane -x $_tmux_main_pane_size
select-layout '6c98,213x55,0,0{72x55,0,0,72,140x55,73,0,73}'
"