dotfiles/home/default/.local/bin/bookmark
2023-05-04 13:55:54 +07:00

11 lines
273 B
Bash
Executable File

#!/bin/sh
bookmark="$(wl-paste)"
file="$HOME/notebook/bookmarks.org"
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