use wl-copy only when XDG_SESSION_TYPE is set to 'wayland', fixes #719
This commit is contained in:
parent
b892bc155b
commit
ee922631b6
1 changed files with 2 additions and 2 deletions
|
@ -126,7 +126,7 @@ bind -T copy-mode-vi L send -X end-of-line
|
|||
if -b 'command -v xsel > /dev/null 2>&1' 'bind y run -b "\"\$TMUX_PROGRAM\" \${TMUX_SOCKET:+-S \"\$TMUX_SOCKET\"} save-buffer - | xsel -i -b"'
|
||||
if -b '! command -v xsel > /dev/null 2>&1 && command -v xclip > /dev/null 2>&1' 'bind y run -b "\"\$TMUX_PROGRAM\" \${TMUX_SOCKET:+-S \"\$TMUX_SOCKET\"} save-buffer - | xclip -i -selection clipboard >/dev/null 2>&1"'
|
||||
# copy to Wayland clipboard
|
||||
if -b 'command -v wl-copy > /dev/null 2>&1' 'bind y run -b "\"\$TMUX_PROGRAM\" \${TMUX_SOCKET:+-S \"\$TMUX_SOCKET\"} save-buffer - | wl-copy"'
|
||||
if -b '[ "$XDG_SESSION_TYPE" = "wayland" ] && command -v wl-copy > /dev/null 2>&1' 'bind y run -b "\"\$TMUX_PROGRAM\" \${TMUX_SOCKET:+-S \"\$TMUX_SOCKET\"} save-buffer - | wl-copy"'
|
||||
# copy to macOS clipboard
|
||||
if -b 'command -v pbcopy > /dev/null 2>&1' 'bind y run -b "\"\$TMUX_PROGRAM\" \${TMUX_SOCKET:+-S \"\$TMUX_SOCKET\"} save-buffer - | pbcopy"'
|
||||
# copy to Windows clipboard
|
||||
|
@ -954,7 +954,7 @@ run 'cut -c3- "$TMUX_CONF" | sh -s _apply_configuration'
|
|||
# tmux_conf_copy_to_os_clipboard=${tmux_conf_copy_to_os_clipboard:-false}
|
||||
# command -v xsel > /dev/null 2>&1 && command='xsel -i -b'
|
||||
# ! command -v xsel > /dev/null 2>&1 && command -v xclip > /dev/null 2>&1 && command='xclip -i -selection clipboard > \/dev\/null 2>\&1'
|
||||
# command -v wl-copy > /dev/null 2>&1 && command='wl-copy'
|
||||
# [ "$XDG_SESSION_TYPE" = "wayland" ] && command -v wl-copy > /dev/null 2>&1 && command='wl-copy'
|
||||
# command -v pbcopy > /dev/null 2>&1 && command='pbcopy'
|
||||
# command -v clip.exe > /dev/null 2>&1 && command='clip\.exe'
|
||||
# [ -c /dev/clipboard ] && command='cat > \/dev\/clipboard'
|
||||
|
|
Loading…
Reference in a new issue