summaryrefslogtreecommitdiff
path: root/.local/bin/add2rss
diff options
context:
space:
mode:
Diffstat (limited to '.local/bin/add2rss')
-rwxr-xr-x.local/bin/add2rss14
1 files changed, 10 insertions, 4 deletions
diff --git a/.local/bin/add2rss b/.local/bin/add2rss
index cf9ea73..ab29362 100755
--- a/.local/bin/add2rss
+++ b/.local/bin/add2rss
@@ -9,8 +9,14 @@ elif test ! -t 0;
then
URL=$(cat < /dev/stdin)
else
- echo "add2rss: No Input"
- exit
+ URL=$(xclip -o clipboard)
+ if test -n "$URL";
+ then
+ notify-send "add2rss: copied $URL from clipboard"
+ else
+ notify-send "add2rss: no input"
+ exit
+ fi
fi
if test -n "$2";
@@ -20,9 +26,9 @@ fi
if test -n "$(grep $URL $RSSFILE)";
then
- echo "add2rss: You already added this feed"
+ notify-send "add2rss: You already added this feed"
else
echo "$URL" >> $RSSFILE
- echo "add2rss: Added"
+ notify-send "add2rss: Added"
fi