dotfiles/scripts/dmenu-bookmarks
2023-07-31 17:34:07 -06:00

8 lines
360 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" ~/.config/bookmarks | cut -d '-' -f 2- | xsel -ib && notify-send "󰃀 Bookmarks" "$name copied to clipboard"