make screen clipboard binding portable : wl-copy, xclip or xsel

Generated by Mistral Vibe.
This commit is contained in:
hugogogo
2026-10-30 11:02:49 +01:00
parent ea8829c75f
commit 8020ed2f84
+3 -1
View File
@@ -16,7 +16,9 @@ defscrollback 10000
# --------------------------------------------------------------------- # ---------------------------------------------------------------------
# permet de copier dans le clipboard, en faisant 'C-a Y' apres une copie avec space # permet de copier dans le clipboard, en faisant 'C-a Y' apres une copie avec space
bind Y eval "writebuf" "exec ... sh -c 'wl-copy < /tmp/screen-exchange'" # essaye d'abord wl-copy (wayland), puis xclip, puis xsel (X11) :
# le premier outil installe sur la machine gagne
bind Y eval "writebuf" "exec ... sh -c 'wl-copy < /tmp/screen-exchange 2>/dev/null || xclip -selection clipboard < /tmp/screen-exchange 2>/dev/null || xsel --clipboard --input < /tmp/screen-exchange'"
# trick to force a full window repaint (press C-a r), fixes display glitches (e.g. with vibe) # trick to force a full window repaint (press C-a r), fixes display glitches (e.g. with vibe)
# NOTE : ecrase le 'C-a r' par defaut (toggle du wrap) # NOTE : ecrase le 'C-a r' par defaut (toggle du wrap)