]> git.friedersdorff.com Git - max/saltfiles.git/commitdiff
Expand wm_paste to cover wayland
authorMaximilian Friedersdorff <max@friedersdorff.com>
Tue, 4 May 2021 07:59:56 +0000 (08:59 +0100)
committerMaximilian Friedersdorff <max@friedersdorff.com>
Tue, 4 May 2021 07:59:56 +0000 (08:59 +0100)
states/tmux/files/wm_copy
states/tmux/files/wm_paste

index d11db6f8b5c55d7d689032caa67f82b88c66fc18..44a802cd431a58dfeb5264cd83e05e592b973ff8 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 -i < /dev/stdin > /dev/null
+fi
index d96d0ee6c90e4cfe5580d29126b694e4c017f638..f25a0d257257f9a1dd31116dedc80d5dc22ae5ef 100644 (file)
@@ -1,3 +1,7 @@
 #!/bin/sh
 
-xclip -o -selection "clipboard"
+if [[ XDG_SESSION_TYPE == "wayland" ]]; then
+    wl-paste
+else
+    xclip -o
+fi