summaryrefslogtreecommitdiff
path: root/clipboard-stream
blob: b4c1120fc8c8270c981c8581fc2ca281848de2b2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
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