Skip to content

Commit

Permalink
fix copy paste finally
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxattax97 committed Aug 16, 2024
1 parent 2d5797c commit 91336b6
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions .tmux.conf
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin 'tmux-plugins/tmux-cpu'
set -g @plugin 'tmux-plugins/tmux-pain-control'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-net-speed'
set -g @plugin 'tmux-plugins/tmux-copycat'
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
Expand Down Expand Up @@ -73,10 +72,15 @@ set -g @batt_color_charging "#[fg=colour033]"

set -g @net_speed_format "󰁆 %8s 󰁞 %8s"

set -g @yank_selection 'clipboard' # or 'primary' or 'secondary'
set -g @yank_selection_mouse 'clipboard' # or 'primary' or 'secondary'
set -g @yank_action 'copy-pipe' # or 'copy-pipe-and-cancel' for the default
set -g @yank_with_mouse on # or 'off'
## Copy paste settings
## https://github.com/tmux/tmux/wiki/Clipboard
set -g mode-keys vi
set -g set-clipboard external
set -s copy-command 'xsel -i --clipboard'
bind -T copy-mode-vi 'v' send -X begin-selection
bind -T copy-mode-vi 'y' send -X copy-pipe
bind -T copy-mode C-c send -X copy-pipe-no-clear
bind -T copy-mode-vi C-c send -X copy-pipe-no-clear

# Sensible: Fix the colors.
#set -g default-terminal "xterm-256color"
Expand Down Expand Up @@ -168,10 +172,6 @@ set -g focus-events on
run-shell "tmux set-environment -g TMUX_VERSION_MAJOR $(tmux -V | cut -d' ' -f2 | cut -d'.' -f1 | sed 's/[^0-9]*//g')"
run-shell "tmux set-environment -g TMUX_VERSION_MINOR $(tmux -V | cut -d' ' -f2 | cut -d'.' -f2 | sed 's/[^0-9]*//g')"

## Sensible: Vi copypaste mode, makes more sense even to us Vim users.
# set-option -g mode-keys emacs
if-shell "test '\( #{$TMUX_VERSION_MAJOR} -eq 2 -a #{$TMUX_VERSION_MINOR} -ge 4 \)'" 'bind-key -Tcopy-mode-vi v send -X begin-selection; bind-key -Tcopy-mode-vi y send -X copy-selection-and-cancel'

# Remove mouse mode fail.
if-shell '\( #{$TMUX_VERSION_MAJOR} -eq 2 -a #{$TMUX_VERSION_MINOR} -ge 1\)' 'set -g mouse off'

Expand Down

0 comments on commit 91336b6

Please sign in to comment.