15 lines
397 B
Bash
Executable file
15 lines
397 B
Bash
Executable file
#!/bin/sh
|
|
# Get URL from clipboard
|
|
# and save as a bookmark
|
|
|
|
bookmark="$(xsel -ob)"
|
|
|
|
if grep -q "$bookmark" "$HOME/Desktop/bookmarks" ; then
|
|
notify-send " Bookmarks" "Already bookmarked"
|
|
else
|
|
name="$(menu 'Bookmark name:' empty)"
|
|
[ -z "$name" ] && exit
|
|
entry="$name-$bookmark"
|
|
echo "$entry" >> "$HOME/Desktop/bookmarks"
|
|
notify-send " Bookmarks" "Added '$entry'"
|
|
fi
|