diff --git a/_home/dot_byobu/dot_tmux.conf b/_home/dot_byobu/dot_tmux.conf new file mode 100644 index 0000000..0faebe3 --- /dev/null +++ b/_home/dot_byobu/dot_tmux.conf @@ -0,0 +1,8 @@ +# Taken from: http://grota.github.io/blog/2012/05/08/tmux-clipboard-integration/ +# Everytime you press the prefix key followed by C-c you will be asked to choose from the list of tmux paste-buffers. The buffer selected will be put into the system clipboard. +bind C-c choose-buffer "run \"tmux save-buffer -b %% - | xclip -i -sel clipboard\" \; run \" tmux display \\\"Clipboard \(+\) filled with: $(tmux save-buffer -b %1 - | dd ibs=1 obs=1 status=noxfer count=80 2> /dev/null)... \\\" \" " +#no buffer %1 +set -g mouse on +source-file $BYOBU_PREFIX/share/byobu/keybindings/f-keys.tmux; +source-file $HOME/.byobu/keybindings.tmux +bind-key -n M-F12 source $BYOBU_PREFIX/share/byobu/keybindings/mouse.tmux.enable \; display-message "Mouse: OFF" diff --git a/_home/dot_sz.shrc.d/34_tmux.tools b/_home/dot_sz.shrc.d/34_tmux.tools index fd899de..afa33aa 100644 --- a/_home/dot_sz.shrc.d/34_tmux.tools +++ b/_home/dot_sz.shrc.d/34_tmux.tools @@ -6,4 +6,20 @@ if [[ -n "$(which-command tmux)" ]]; then __C="$HOME/.local/share/bash-completion/tmux/completions/tmux" [[ -r $__C ]] && . <( cat $__C ) unset __C + + 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