aboutsummaryrefslogtreecommitdiff
path: root/dotfiles/.local/bin/clipremote
blob: 2dc229515e322eccb6374d7d3f826ffcd53a960b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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