feat(tmux): mappings

This commit is contained in:
thek4n 2024-04-25 11:46:14 +03:00
parent 910fde9b06
commit 62d9cc825c
4 changed files with 10 additions and 7 deletions

View File

@ -1,4 +1,5 @@
# vim: ft=tmux # vim: ft=tmux
set -ga command-alias kill='kill-session -t' set -g command-alias[101] kill='kill-session -t'
set -ga command-alias k='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..."'

View File

@ -32,8 +32,9 @@ bind n command-prompt -p "New session:" "new-session -A -d -s '%1' -c ~ \; switc
bind x confirm-before -p "kill current session? (y/n)" "switch-client -l \; kill-session -t '#S'" bind x confirm-before -p "kill current session? (y/n)" "switch-client -l \; kill-session -t '#S'"
bind k confirm-before -p "kill current pane? (y/n)" "kill-pane" bind k confirm-before -p "kill current pane? (y/n)" "kill-pane"
# Kill last session # Kill last session
bind X confirm-before -p "kill last session? (y/n)" "kill-session -t '#{client_last_session}'" bind X confirm-before -p "kill last session [#{client_last_session}]? (y/n)" "kill-session -t #{client_last_session} \; display-message \"Killed last session\""
# SSH Session # SSH Session
@ -53,7 +54,7 @@ bind l confirm-before -p "lock tmux? (y/n)" lock-session
# Reload config # Reload config
bind r source-file ~/.config/tmux/tmux.conf \; display-message "Config reloaded..." bind r reload-config
bind R if-shell "git -C ~/dotfiles pull" "source-file '$HOME/.config/tmux/tmux.conf' \; display-message 'Config reloaded...'" "display-message 'Error while fetching config'" bind R if-shell "git -C ~/dotfiles pull" "source-file '$HOME/.config/tmux/tmux.conf' \; display-message 'Config reloaded...'" "display-message 'Error while fetching config'"

View File

@ -1,9 +1,9 @@
# vim: ft=tmux # vim: ft=tmux
source-file "$HOME/.config/tmux/mappings.conf"
source-file "$HOME/.config/tmux/options.conf" source-file "$HOME/.config/tmux/options.conf"
source-file "$HOME/.config/tmux/style.conf"
source-file "$HOME/.config/tmux/aliases.conf" source-file "$HOME/.config/tmux/aliases.conf"
source-file "$HOME/.config/tmux/mappings.conf"
source-file "$HOME/.config/tmux/style.conf"
if-shell 'test -e "$HOME/.config/tmux/local.conf"' 'source-file "$HOME/.config/tmux/local.conf"' if-shell 'test -e "$HOME/.config/tmux/local.conf"' 'source-file "$HOME/.config/tmux/local.conf"'

View File

@ -1,3 +1,5 @@
# vim: ft=zsh
_so() { _so() {
[ -r "$1" ] && [ -f "$1" ] && source "$1" [ -r "$1" ] && [ -f "$1" ] && source "$1"
} }
@ -5,7 +7,6 @@ _so() {
_so "$XDG_CONFIG_HOME/bash/export" _so "$XDG_CONFIG_HOME/bash/export"
_so "$XDG_CONFIG_HOME/bash/aliases" _so "$XDG_CONFIG_HOME/bash/aliases"
_so "$XDG_CONFIG_HOME/bash/completion"
_so "$XDG_CONFIG_HOME/bash/functions" _so "$XDG_CONFIG_HOME/bash/functions"
_so "$XDG_CONFIG_HOME/bash/hosts/$HOST" _so "$XDG_CONFIG_HOME/bash/hosts/$HOST"