From 75ad63673b7839191876a4c000cdd0f4975070fa Mon Sep 17 00:00:00 2001 From: Marlon Silva Date: Sat, 29 Jul 2023 17:13:48 -0300 Subject: [PATCH] First commit --- bookmark.sh | 9 +++++++++ feedrss.sh | 9 +++++++++ get-boomark.sh | 2 ++ 3 files changed, 20 insertions(+) create mode 100755 bookmark.sh create mode 100755 feedrss.sh create mode 100755 get-boomark.sh diff --git a/bookmark.sh b/bookmark.sh new file mode 100755 index 0000000..0fe0060 --- /dev/null +++ b/bookmark.sh @@ -0,0 +1,9 @@ +#/bin/sh +bookmark="$(xclip -o)" +file="$HOME/repositories/bookmarks/bookmarks.txt" +if grep -q "^$bookmark$" "$file";then + notify-send "Failed" "Already bookmarked!" +else + notify-send "Success" "$bookmark added to the file!" + echo "$bookmark" >> "$file" +fi diff --git a/feedrss.sh b/feedrss.sh new file mode 100755 index 0000000..3ed7be4 --- /dev/null +++ b/feedrss.sh @@ -0,0 +1,9 @@ +#/bin/sh +feed="$(xclip -o)" +file="$HOME/repositories/bookmarks/feeds.txt" +if grep -q "^$feed$" "$file";then + notify-send "Failed" "Already in the feed!" +else + notify-send "Success" "$feed added to the file!" + echo "$feed" >> "$file" +fi diff --git a/get-boomark.sh b/get-boomark.sh new file mode 100755 index 0000000..c31f963 --- /dev/null +++ b/get-boomark.sh @@ -0,0 +1,2 @@ +#!/bin/bash +xdotool type $(grep -v '^#' $HOME/repositories/bookmarks/bookmarks.txt | dmenu -i -l 50 | cut -d' ' -f1)