From b94839324996ab3c9b0249eadc3930e54ffd1a86 Mon Sep 17 00:00:00 2001 From: Yaroslav Date: Sun, 23 Aug 2020 15:44:34 +0300 Subject: Shortcuts to control my other computer through ssh * Scripts to simplify executing of commands through ssh, and to send current computer's clipboard to the other one and viceversa. * sway shortcuts to control mpd, audio volume and clipboard data. --- dotfiles/.local/bin/clipremote | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 dotfiles/.local/bin/clipremote (limited to 'dotfiles/.local/bin/clipremote') 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 -- cgit v1.2.3