commit 9dbe5f1058eb98070d4364abf0dd010bc94d93f6 parent 8a8d33e0ca507d8d4ca20e72a3c5f965dc075264 Author: Anders Damsgaard <anders@adamsgaard.dk> Date: Thu, 19 Mar 2020 09:46:05 +0100 Add simple shared clipboard Diffstat:
A | .local/bin/cclip | | | 18 | ++++++++++++++++++ |
1 file changed, 18 insertions(+), 0 deletions(-)
diff --git a/.local/bin/cclip b/.local/bin/cclip @@ -0,0 +1,18 @@ +#!/bin/sh +f="cclip" + +toclip() { + upload "$f" >/dev/null +} + +fromclip() { + upload -g "$f" + cat "$f" + rm -f "$f" +} + +if [ "$1" = "-o" ]; then + fromclip +else + toclip +fi