]> git.friedersdorff.com Git - max/saltfiles.git/blobdiff - states/tmux/files/wm_copy
Use clipboard, not primary selection for tmux copy paste
[max/saltfiles.git] / states / tmux / files / wm_copy
index d11db6f8b5c55d7d689032caa67f82b88c66fc18..1ea6ef0e7eb200f7a799f3abbb2cd0904065e90f 100644 (file)
@@ -1,3 +1,7 @@
 #!/bin/sh
 
-xclip -i -selection "clipboard"
+if [[ $XDG_SESSION_TYPE == "wayland" ]]; then
+    wl-copy < /dev/stdin > /dev/null
+else
+    xclip -selection clipboard -i < /dev/stdin > /dev/null
+fi