aboutsummaryrefslogtreecommitdiff
path: root/tmux/paste.sh
diff options
context:
space:
mode:
authorbozo.kopic <bozo@kopic.xyz>2021-10-03 23:21:15 +0200
committerbozo.kopic <bozo@kopic.xyz>2021-10-03 23:21:15 +0200
commitfa5dd5f3c014a250b1748c340255d8b4d0b7d773 (patch)
treeb923aabfdfd4e46fe8c0a42164dc78ceb5435217 /tmux/paste.sh
parent112a38a0d4f3debab29749352c61968bee98e477 (diff)
.
Diffstat (limited to 'tmux/paste.sh')
-rwxr-xr-xtmux/paste.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/tmux/paste.sh b/tmux/paste.sh
new file mode 100755
index 0000000..b09a794
--- /dev/null
+++ b/tmux/paste.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+if [ -z "$WAYLAND_DISPLAY" ]; then
+ xclip -o -selection clipboard | tmux load-buffer - && tmux paste-buffer
+else
+ wl-paste --no-newline | tmux load-buffer - && tmux paste-buffer
+fi