dotfiles.2022/_home/dot_sz.shrc.d/34_tmux.tools

26 lines
489 B
Plaintext
Raw Normal View History

if [[ -n "$(which-command tmux)" ]]; then
function clip-tmux() {
tmux save-buffer -a - | clip
}
__C="$HOME/.local/share/bash-completion/tmux/completions/tmux"
[[ -r $__C ]] && . <( cat $__C )
unset __C
2022-08-15 20:57:29 +00:00
function tmux-down() {
tmux split-window "${@}"
}
function tmux-up() {
tmux-down "${@}"; tmux swap-pane -dt -1
}
function tmux-right() {
tmux split-window -h "${@}"
}
function tmux-left() {
tmux-right "${@}"; tmux swap-pane -dt -1
}
fi