From 574d3e58d38a4ab9ef7ea166b69fb53fab57176a Mon Sep 17 00:00:00 2001 From: Jeremy Kaplan Date: Thu, 29 Aug 2019 11:24:56 -0700 Subject: [PATCH] xsel-clear: Notify on completion --- bin/xsel-clear | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/bin/xsel-clear b/bin/xsel-clear index 867b1bd..daec7f1 100755 --- a/bin/xsel-clear +++ b/bin/xsel-clear @@ -1,3 +1,11 @@ #!/bin/sh -xsel -c && xsel -sc && xsel -bc +xsel_clear() { + xsel -c && xsel -sc && xsel -bc +} + +if xsel_clear; then + notify-send -t 1000 'xsel-clear' +else + notify-send -t 1000 -h 'string:bgcolor:#ff0000' 'xsel failed to clear' +fi