diff options
Diffstat (limited to 'dotfiles/.local')
-rwxr-xr-x | dotfiles/.local/bin/clipremote | 15 | ||||
-rwxr-xr-x | dotfiles/.local/bin/exremote | 9 |
2 files changed, 24 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 diff --git a/dotfiles/.local/bin/exremote b/dotfiles/.local/bin/exremote new file mode 100755 index 0000000..a6bbbbb --- /dev/null +++ b/dotfiles/.local/bin/exremote @@ -0,0 +1,9 @@ +#!/bin/sh + +# Helper script to execute commands on remote host + +[ -n "$1" ] || (echo "Specify command to run" && exit 0) + +host=$(cat $HOME/.config/exremote/host) + +ssh "$host" "source /home/$(whoami)/.profile 2> /dev/null && $1" |