Random bookmark option
This commit is contained in:
parent
f453b11b76
commit
4388e67fba
|
@ -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;;
|
||||
|
|
|
@ -6,7 +6,7 @@ open-bookmark(1)
|
|||
|
||||
# SYNOPSIS
|
||||
|
||||
*open-bookmark -s|f|r|d|h*
|
||||
*open-bookmark -s|f|r|d|R|h*
|
||||
|
||||
# DESCRIPTION
|
||||
*qutebrowser(1)* saves its bookmarks in
|
||||
|
@ -28,6 +28,9 @@ qutebrowser sometimes. Hence this script now exists.
|
|||
*-d*
|
||||
use *$MENU* to select bookmark
|
||||
|
||||
*-R*
|
||||
open random bookmark
|
||||
|
||||
*-h*
|
||||
print usage and exit
|
||||
|
||||
|
|
Loading…
Reference in a new issue