summaryrefslogtreecommitdiff
path: root/scripts/bookmark.sh
diff options
context:
space:
mode:
authorsubh <subh@subh.space>2026-03-29 08:07:44 +0530
committersubh <subh@subh.space>2026-03-29 08:07:44 +0530
commit759e0c0677c55e99361538054ed87bf7060c654f (patch)
tree76ebf504f1879105d1cb26b034bbb20f6d7f470e /scripts/bookmark.sh
parent4f385e142bfa70081d55fce3627730510fe255c1 (diff)
added a bookmark manager for browsers and added uptime to the qs bar
Diffstat (limited to 'scripts/bookmark.sh')
-rwxr-xr-xscripts/bookmark.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/scripts/bookmark.sh b/scripts/bookmark.sh
new file mode 100755
index 0000000..a41eb8e
--- /dev/null
+++ b/scripts/bookmark.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+bookmark=$(wl-paste -p)
+filename="$HOME/.local/share/larbs/bookmarks"
+
+
+if [[ "$bookmark" =~ ^https?:// ]]; then
+ if grep -q "^$bookmark$" "$filename"; then
+ notify-send "Bookmark Status" "Already Bookmarked"
+ else
+ notify-send "Bookmark Status" "Bookmark Added"
+ echo "$bookmark" >> "$filename"
+ fi
+else
+ exit 1
+fi