i3/scripts/add_bookmark.sh
2025-07-20 20:50:57 -04:00

11 lines
248 B
Bash
Executable file

#!/bin/bash
clipboard=$(xclip -o)
bookmark_file=$HOME/.bookmarks
if grep -q "^$clipboard$" "$bookmark_file"; then
notify-send "Bookmark was already in file!"
else
echo $clipboard >> $bookmark_file
notify-send "Saving Bookmark" "$clipboard"
fi