aboutsummaryrefslogtreecommitdiff
path: root/dotfiles/.local/bin/clipremote
diff options
context:
space:
mode:
Diffstat (limited to 'dotfiles/.local/bin/clipremote')
-rwxr-xr-xdotfiles/.local/bin/clipremote15
1 files changed, 15 insertions, 0 deletions
diff --git a/dotfiles/.local/bin/clipremote b/dotfiles/.local/bin/clipremote
new file mode 100755
index 0000000..2dc2295
--- /dev/null
+++ b/dotfiles/.local/bin/clipremote
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# Helper script to retrieve and send clipboard data to/from remote host
+
+action="copy"
+[ -n "$1" ] && action="$1"
+
+case "$action" in
+ copy)
+ exremote "wl-copy '$(wl-paste)'";;
+ paste)
+ exremote "wl-paste" | wl-copy --trim-newline;;
+ *)
+ echo "$1 is not a valid action";;
+esac