Skip to content

Instantly share code, notes, and snippets.

View rehhouari's full-sized avatar
💫

Rafik El Hadi Houari rehhouari

💫
View GitHub Profile
@rehhouari
rehhouari / system-wide-clipboard-linux.zsh
Last active March 31, 2024 05:03 — forked from varenc/system-wide-clipboard.zsh
Zsh copy & paste system wide for Linux (X11& Wayland with customizable paste and copy commands)
# Forked from https://gist.github.com/varenc/e4a22145c484771f254fa20982e2cd7f
## 2024-03-30: Ported it to Linux, added display detection and customizable copy/paste commands
## Using environment variables
## 2020-05-16: Changed `echo` to `printf` so that backslashes are not interpretted by echo
## and so that CUTBUFFER shows up exactly in the pasteboard without modification
# Detect display server
display_server=$(echo $DISPLAY | cut -d: -f1)