mirror of
1
0
Fork 0

added support for wl-clipboard, closes #589, closes #606

see https://github.com/bugaevc/wl-clipboard
This commit is contained in:
sarumont 2022-08-08 14:08:36 -06:00 committed by Gregory Pakosz
parent 562f9c128e
commit ccbfdf2091
3 changed files with 5 additions and 2 deletions

View File

@ -150,6 +150,8 @@ run -b 'tmux bind -T copy-mode-vi L send -X end-of-line 2> /dev/null || true'
# copy to X11 clipboard # copy to X11 clipboard
if -b 'command -v xsel > /dev/null 2>&1' 'bind y run -b "tmux save-buffer - | xsel -i -b"' if -b 'command -v xsel > /dev/null 2>&1' 'bind y run -b "tmux 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 save-buffer - | xclip -i -selection clipboard >/dev/null 2>&1"' if -b '! command -v xsel > /dev/null 2>&1 && command -v xclip > /dev/null 2>&1' 'bind y run -b "tmux 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 save-buffer - | wl-copy"'
# copy to macOS clipboard # copy to macOS clipboard
if -b 'command -v pbcopy > /dev/null 2>&1' 'bind y run -b "tmux save-buffer - | pbcopy"' if -b 'command -v pbcopy > /dev/null 2>&1' 'bind y run -b "tmux save-buffer - | pbcopy"'
if -b 'command -v reattach-to-user-namespace > /dev/null 2>&1' 'bind y run -b "tmux save-buffer - | reattach-to-user-namespace pbcopy"' if -b 'command -v reattach-to-user-namespace > /dev/null 2>&1' 'bind y run -b "tmux save-buffer - | reattach-to-user-namespace pbcopy"'
@ -814,6 +816,7 @@ run 'cut -c3- ~/.tmux.conf | sh -s _apply_configuration'
# tmux_conf_copy_to_os_clipboard=${tmux_conf_copy_to_os_clipboard:-false} # 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='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 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'
# command -v pbcopy > /dev/null 2>&1 && command='pbcopy' # command -v pbcopy > /dev/null 2>&1 && command='pbcopy'
# command -v reattach-to-user-namespace > /dev/null 2>&1 && command='reattach-to-user-namespace pbcopy' # command -v reattach-to-user-namespace > /dev/null 2>&1 && command='reattach-to-user-namespace pbcopy'
# command -v clip.exe > /dev/null 2>&1 && command='clip\.exe' # command -v clip.exe > /dev/null 2>&1 && command='clip\.exe'

View File

@ -329,7 +329,7 @@ tmux_conf_theme_clock_style="24"
# - false (default) # - false (default)
# - disabled # - disabled
# on macOS, this requires installing reattach-to-user-namespace, see README.md # on macOS, this requires installing reattach-to-user-namespace, see README.md
# on Linux, this requires xsel or xclip # on Linux, this requires xsel, xclip or wl-copy
tmux_conf_copy_to_os_clipboard=false tmux_conf_copy_to_os_clipboard=false

View File

@ -113,7 +113,7 @@ Features
- configurable new windows and panes behavior (optionally retain current path) - configurable new windows and panes behavior (optionally retain current path)
- SSH/Mosh aware split pane (reconnects to remote server) - SSH/Mosh aware split pane (reconnects to remote server)
- copy to OS clipboard (needs [`reattach-to-user-namespace`][reattach-to-user-namespace] - copy to OS clipboard (needs [`reattach-to-user-namespace`][reattach-to-user-namespace]
on macOS, `xsel` or `xclip` on Linux) on macOS, `xsel`, `xclip`, or `wl-copy` on Linux)
- support for 4-digit hexadecimal Unicode characters - support for 4-digit hexadecimal Unicode characters
- [Facebook PathPicker][] integration if available - [Facebook PathPicker][] integration if available
- [Urlview][] integration if available - [Urlview][] integration if available