Add support for OSC 52 clipboard to work over mosh/without X11

This commit is contained in:
Daniel Lundin 2019-10-29 14:16:27 +01:00
parent 9a7fe73014
commit 9c26972292
2 changed files with 11 additions and 1 deletions

View file

@ -3,15 +3,22 @@ set -g prefix ^o
set -g base-index 1 set -g base-index 1
set -g display-panes-time 3000 set -g display-panes-time 3000
#set -s escape-time 7 #set -s escape-time 7
set -s escape-time 50 set -s escape-time 10
set -g status on set -g status on
set -g status-interval 30 set -g status-interval 30
set -g terminal-overrides "xterm*:XT:smcup@:rmcup@:kUP5=\eOA:kDN5=\eOB:kLFT5=\eOD:kRIT5=\eOC" set -g terminal-overrides "xterm*:XT:smcup@:rmcup@:kUP5=\eOA:kDN5=\eOB:kLFT5=\eOD:kRIT5=\eOC"
set -g terminal-overrides ",*:colors=256:smso=\e[3m:rmso=\e[23m:sitm=\e[3m:ritm=\e[23m" set -g terminal-overrides ",*:colors=256:smso=\e[3m:rmso=\e[23m:sitm=\e[3m:ritm=\e[23m"
set -g terminal-overrides ",xterm-256color:Tc" set -g terminal-overrides ",xterm-256color:Tc"
set -ga terminal-overrides ",xterm-256color:Tc" set -ga terminal-overrides ",xterm-256color:Tc"
set-option -ag terminal-overrides ",xterm-256color:Ms=\\E]52;c;%p2%s\\7"
set -g default-terminal "xterm-256color" set -g default-terminal "xterm-256color"
# clipboard
set -g set-clipboard on
bind-key ] paste-buffer -p
set-option -g mouse on set-option -g mouse on
#bind -n WheelUpPane copy-mode #bind -n WheelUpPane copy-mode

3
bin/clip Executable file
View file

@ -0,0 +1,3 @@
#!/bin/sh
set -eo pipefail
printf "\033]52;c;$(base64 -w0)\a"