Random bookmark option

This commit is contained in:
Nox Sluijtman 2023-10-20 15:54:53 +02:00
parent f453b11b76
commit 4388e67fba
2 changed files with 7 additions and 3 deletions

View file

@ -1,16 +1,17 @@
#!/bin/sh
usage(){
printf "Usage: %s -s|f|r|d|h\n" $(basename $0)
printf "Usage: %s -s|f|r|d|R|h\n" $(basename $0)
}
bookmarks="${BOOKMARKS:-"$HOME/.config/qutebrowser/bookmarks/urls"}"
while getopts sfrdh name; do
while getopts sfrdRh name; do
case $name in
f) menu="fzf";;
r) menu="rofi -dmenu -i -p 'Bookmarks'";;
s) menu="sk";;
d) menu="${MENU}";;
R) xdg-open "$(shuf -n1 $bookmarks | awk '{print $1}')";;
h) usage ;;
*) usage
exit 2;;