mirror of
https://github.com/LukeSmithxyz/voidrice.git
synced 2025-10-07 07:22:36 +02:00
Adding bookmarkscript by Luke Smith, shown in YT video "Bookmarking for Unix Chads..."... what do you think?
12 lines
260 B
Bash
12 lines
260 B
Bash
#!/bin/sh
|
|
|
|
bookmark="$(xclip -o)"
|
|
file="$HOME/.local/share/larbs/snippets"
|
|
|
|
if grep "^$bookmark$" "$file"; then
|
|
notify-send "Oops." "Already bookmarked!"
|
|
else
|
|
notify-send "Bookmark added!" "$bookmark is now saved to the file."
|
|
echo "$bookmark" >> "$file"
|
|
fi
|