Update tmux configs

+ Update alias for resetting plasmashell
+ Plugins for tmux as submodules
+ Enable MMB to paste
This commit is contained in:
Shaun Reed 2022-07-16 10:20:50 -04:00
parent 41dc71d3a4
commit 7565c99f12
6 changed files with 35 additions and 1 deletions

View File

@ -3,7 +3,7 @@ alias python3='python3.9'
alias pip3='python3.9 -m pip' alias pip3='python3.9 -m pip'
# Alias to restart plasmashell for Kubuntu Plasma session # Alias to restart plasmashell for Kubuntu Plasma session
alias kapp-plasmashell='sudo pkill plasmashell && plasmashell --replace &> /dev/null &' alias kapp-plasmashell='sudo pkill plasmashell && sleep 1 && (plasmashell --replace &> /dev/null &)'
# Alias to clear swap # Alias to clear swap
alias kapp-swap='sudo swapoff -a && sudo swapon -a' alias kapp-swap='sudo swapoff -a && sudo swapon -a'
# Alias to initialize github user # Alias to initialize github user

6
.gitmodules vendored
View File

@ -31,3 +31,9 @@
[submodule ".tmux/plugins/tpm"] [submodule ".tmux/plugins/tpm"]
path = .tmux/plugins/tpm path = .tmux/plugins/tpm
url = https://github.com/tmux-plugins/tpm url = https://github.com/tmux-plugins/tpm
[submodule ".tmux/plugins/tmux-yank"]
path = .tmux/plugins/tmux-yank
url = https://github.com/tmux-plugins/tmux-yank
[submodule ".tmux/plugins/tmux-better-mouse-mode"]
path = .tmux/plugins/tmux-better-mouse-mode
url = https://github.com/NHDaly/tmux-better-mouse-mode

View File

@ -20,7 +20,28 @@
#+ Vim plugin 'Colorizer' does not reflect the actual 256colour values #+ Vim plugin 'Colorizer' does not reflect the actual 256colour values
#+ See https://jonasjacek.github.io/colors/ for a full list of 256colours #+ See https://jonasjacek.github.io/colors/ for a full list of 256colours
# Settings for terminal text selection / copy options
# + Source: https://www.seanh.cc/2020/12/27/copy-and-paste-in-tmux/
# + Depends: https://github.com/tmux-plugins/tmux-yank#linux
set -g mouse on set -g mouse on
# These bindings are for X Windows only. If you're using a different
# window system you have to replace the `xsel` commands with something
# else. See https://github.com/tmux/tmux/wiki/Clipboard#available-tools
bind -T copy-mode DoubleClick1Pane select-pane \; send -X select-word \; send -X copy-pipe-no-clear "xsel -i"
bind -T copy-mode-vi DoubleClick1Pane select-pane \; send -X select-word \; send -X copy-pipe-no-clear "xsel -i"
bind -n DoubleClick1Pane select-pane \; copy-mode -M \; send -X select-word \; send -X copy-pipe-no-clear "xsel -i"
bind -T copy-mode TripleClick1Pane select-pane \; send -X select-line \; send -X copy-pipe-no-clear "xsel -i"
bind -T copy-mode-vi TripleClick1Pane select-pane \; send -X select-line \; send -X copy-pipe-no-clear "xsel -i"
bind -n TripleClick1Pane select-pane \; copy-mode -M \; send -X select-line \; send -X copy-pipe-no-clear "xsel -i"
bind -n MouseDown2Pane run "tmux set-buffer -b primary_selection \"$(xsel -o)\"; tmux paste-buffer -b primary_selection; tmux delete-buffer -b primary_selection"
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @yank_action 'copy-pipe-no-clear'
bind -T copy-mode C-c send -X copy-pipe-no-clear "xsel -i --clipboard"
bind -T copy-mode-vi C-c send -X copy-pipe-no-clear "xsel -i --clipboard"
set-option -s set-clipboard external
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xclip -selection clipboard -i"
# remap shortcut prefix from 'C-b' to 'C-z' # remap shortcut prefix from 'C-b' to 'C-z'
unbind C-b unbind C-b

@ -0,0 +1 @@
Subproject commit aa59077c635ab21b251bd8cb4dc24c415e64a58e

@ -0,0 +1 @@
Subproject commit 1b1a436e19f095ae8f825243dbe29800a8acd25c

View File

@ -42,6 +42,11 @@
"xbindkeys_show" "xbindkeys_show"
control+shift + q control+shift + q
# Disables middle-mouse button
# + If this doesn't work, try to remove '+ Release'
#"echo -n | xsel -n -i; pkill xbindkeys; xdotool click 2; xbindkeys"
# b:2 + Release
# set directly keycode (here control + f with my keyboard) # set directly keycode (here control + f with my keyboard)
#"xterm" #"xterm"
# c:41 + m:0x4 # c:41 + m:0x4