From b9e00afded90f03ac18f75aa7dfc8e7f3e146348 Mon Sep 17 00:00:00 2001 From: Jacob McDonnell Date: Tue, 3 Jan 2023 18:36:25 -0500 Subject: Added some scripts --- .local/bin/add2rss | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to '.local/bin/add2rss') 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 -- cgit v1.2.3