summaryrefslogtreecommitdiff
path: root/clipboard-stream
diff options
context:
space:
mode:
Diffstat (limited to 'clipboard-stream')
-rwxr-xr-xclipboard-stream13
1 files changed, 13 insertions, 0 deletions
diff --git a/clipboard-stream b/clipboard-stream
new file mode 100755
index 0000000..b4c1120
--- /dev/null
+++ b/clipboard-stream
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+set -e
+
+recent_value=$(xclip -o -selection clipboard)
+while true ; do
+ value=$(xclip -o -selection clipboard)
+ if [ "$recent_value" != "$value" ] ; then
+ recent_value=$value
+ echo $recent_value
+ fi
+ sleep 0.1
+done