feat(tmux): add tmux-ggclone and copy support for linux and mac

This commit is contained in:
2024-01-25 19:52:31 +01:00
parent f1e8dc27e5
commit afc6af93ca
3 changed files with 27 additions and 2 deletions

View File

@@ -15,7 +15,15 @@ set -g status-left-length 30
set-window-option -g mode-keys vi
bind -T copy-mode-vi v send-keys -X begin-selection
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'pbcopy'
# differentiate copy on linux and max
if-shell -b '[ "$(uname -s)" = "Linux" ]' {
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -in -selection clipboard'
}
if-shell -b '[ "$(uname -s)" = "Darwin" ]' {
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'pbcopy'
}
# vim-like pane switching
bind -r ^ last-window
@@ -29,6 +37,7 @@ bind -r t neww -c "~" "nvim ~/.TODO.md"
bind-key -r f run-shell "tmux neww ~/.config/tmux/tmux-sessionizer"
bind-key -r g run-shell "tmux neww ~/.config/tmux/tmux-sessionizer $XDG_CONFIG_HOME"
bind-key -r T run-shell "tmux neww ~/.config/tmux/tmux-sessionizer ~/Desktop/temp"
bind-key -r T run-shell "tmux neww ~/.config/tmux/tmux-sessionizer ~/temp"
bind-key -r R run-shell "tmux neww ~/.config/tmux/tmux-sessionizer ~"
bind-key -r G run-shell "tmux neww ~/.config/tmux/tmux-ggclone"