wip
This commit is contained in:
parent
2f3a3fb6f9
commit
065ea65b07
13
.tmux.conf
13
.tmux.conf
|
@ -142,16 +142,8 @@ run -b 'tmux bind -T copy-mode-vi H send -X start-of-line 2> /dev/null || true'
|
|||
run -b 'tmux bind -t vi-copy L end-of-line 2> /dev/null || true'
|
||||
run -b 'tmux bind -T copy-mode-vi L send -X end-of-line 2> /dev/null || true'
|
||||
|
||||
# copy to OS clipboard with OSC 52 escape sequence
|
||||
# copy to OS clipboard
|
||||
bind y run -b 'cut -c3- ~/.tmux.conf | sh -s _copy #{pane_tty}'
|
||||
# copy to Mac OSX clipboard
|
||||
if -b 'command -v reattach-to-user-namespace > /dev/null 2>&1' 'bind y run -b "tmux save-buffer - | reattach-to-user-namespace pbcopy"'
|
||||
# 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 && command -v xclip > /dev/null 2>&1' 'bind y run -b "tmux save-buffer - | xclip -i -selection clipboard >/dev/null 2>&1"'
|
||||
# copy to Windows clipboard
|
||||
if -b 'command -v clip.exe > /dev/null 2>&1' 'bind y run -b "tmux save-buffer - | clip.exe"'
|
||||
if -b '[ -c /dev/clipboard ]' 'bind y run -b "tmux save-buffer - > /dev/clipboard"'
|
||||
|
||||
|
||||
# -- buffers -------------------------------------------------------------------
|
||||
|
@ -630,7 +622,8 @@ run 'cut -c3- ~/.tmux.conf | sh -s _apply_configuration'
|
|||
#
|
||||
# _copy() {
|
||||
# tty="$SSH_TTY"
|
||||
# tty=${1:-$(tmux display -p '#{pane_tty}')}
|
||||
# tty=${tty:-$1}
|
||||
# tty=${tty:-$(tmux display -p '#{pane_tty}')}
|
||||
# buffer=${2:-$(tmux save-buffer -)}
|
||||
#
|
||||
# if [ "$tty" != "$SSH_TTY" ]; then
|
||||
|
|
Loading…
Reference in New Issue