dotfiles/home/default/.local/bin/bookmark

11 lines
273 B
Plaintext
Raw Normal View History

2023-05-03 10:19:35 -04:00
#!/bin/sh
bookmark="$(wl-paste)"
2023-05-04 02:55:54 -04:00
file="$HOME/notebook/bookmarks.org"
2023-05-03 10:19:35 -04:00
if grep -q "^$bookmark$" "$file"; then
notify-send "error." "bookmark \"$bookmark\" exists."
else
notify-send "bookmark added." "$bookmark is now saved to the file."
echo "$bookmark" >> "$file"
fi