commit fd8b6bfe3718a375ac3ee2771825b57034cffa97
parent 2f9998bb3052e9710c80891e3a2e2370d5238c33
Author: Chris Down <chris@chrisdown.name>
Date: Wed, 5 Feb 2014 18:02:39 +0800
Check that there really is some data before storing it
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/clipmenud b/clipmenud
@@ -7,6 +7,9 @@ while sleep 1; do
for selection in clipboard primary; do
data=$(xsel --"$selection"; printf x)
data=${data%x}
+
+ [[ $data ]] || continue
+
md5=$(md5sum <<< "$data")
md5=${md5%% *}