dotfiles/scripts/dmenu-bookmarks
2023-07-31 21:37:03 -06:00

8 lines
368 B
Bash
Executable file

#!/bin/sh
# Open URLs from bookmarks file
# Print site names, then get URL based on the name. Exit if empty
name=$(cut -d '-' -f 1 $HOME/Documents/bookmarks | grep -v '^#' | sed '/^\s*$/d' | dmenu -i -p "Site:")
[ -z "$name" ] && exit
grep "$name" $HOME/Documents/bookmarks | cut -d '-' -f 2- | xsel -ib && notify-send "󰃀 Bookmarks" "'$name' copied to clipboard"