Random bookmark option
This commit is contained in:
parent
f453b11b76
commit
4388e67fba
|
@ -1,16 +1,17 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
usage(){
|
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"}"
|
bookmarks="${BOOKMARKS:-"$HOME/.config/qutebrowser/bookmarks/urls"}"
|
||||||
while getopts sfrdh name; do
|
while getopts sfrdRh name; do
|
||||||
case $name in
|
case $name in
|
||||||
f) menu="fzf";;
|
f) menu="fzf";;
|
||||||
r) menu="rofi -dmenu -i -p 'Bookmarks'";;
|
r) menu="rofi -dmenu -i -p 'Bookmarks'";;
|
||||||
s) menu="sk";;
|
s) menu="sk";;
|
||||||
d) menu="${MENU}";;
|
d) menu="${MENU}";;
|
||||||
|
R) xdg-open "$(shuf -n1 $bookmarks | awk '{print $1}')";;
|
||||||
h) usage ;;
|
h) usage ;;
|
||||||
*) usage
|
*) usage
|
||||||
exit 2;;
|
exit 2;;
|
||||||
|
|
|
@ -6,7 +6,7 @@ open-bookmark(1)
|
||||||
|
|
||||||
# SYNOPSIS
|
# SYNOPSIS
|
||||||
|
|
||||||
*open-bookmark -s|f|r|d|h*
|
*open-bookmark -s|f|r|d|R|h*
|
||||||
|
|
||||||
# DESCRIPTION
|
# DESCRIPTION
|
||||||
*qutebrowser(1)* saves its bookmarks in
|
*qutebrowser(1)* saves its bookmarks in
|
||||||
|
@ -28,6 +28,9 @@ qutebrowser sometimes. Hence this script now exists.
|
||||||
*-d*
|
*-d*
|
||||||
use *$MENU* to select bookmark
|
use *$MENU* to select bookmark
|
||||||
|
|
||||||
|
*-R*
|
||||||
|
open random bookmark
|
||||||
|
|
||||||
*-h*
|
*-h*
|
||||||
print usage and exit
|
print usage and exit
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue