add scripts
This commit is contained in:
10
home/default/.local/bin/bookmark
Executable file
10
home/default/.local/bin/bookmark
Executable file
@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
bookmark="$(wl-paste)"
|
||||
file="$HOME/notebook/bookmarks/bookmarks.md"
|
||||
|
||||
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
|
Reference in New Issue
Block a user