diff options
Diffstat (limited to 'examples/scripts/load_url_from_bookmarks.sh')
-rwxr-xr-x | examples/scripts/load_url_from_bookmarks.sh | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/examples/scripts/load_url_from_bookmarks.sh b/examples/scripts/load_url_from_bookmarks.sh index 35c772c..2d19067 100755 --- a/examples/scripts/load_url_from_bookmarks.sh +++ b/examples/scripts/load_url_from_bookmarks.sh @@ -1,5 +1,11 @@ #!/bin/bash +if dmenu --help 2>&1 | grep -q '\[-rs\] \[-ni\] \[-nl\] \[-xs\]' +then + DMENU="dmenu -i -xs -rs -l 10" # vertical patch +else + DMENU="dmenu -i" +fi # you probably want your bookmarks file in your $XDG_DATA_HOME ( eg $HOME/.local/share/uzbl/bookmarks) if [ -f /usr/share/uzbl/examples/data/bookmarks ] then @@ -8,6 +14,6 @@ else file=./examples/data/bookmarks #useful when developing fi -goto=`awk '{print $1}' $file | dmenu -i` #NOTE: it's the job of the script that inserts bookmarks to make sure there are no dupes. -#[ -n "$goto" ] && echo "uri $goto" > $4 -[ -n "$goto" ] && uzblctrl -s $5 -c "uri $goto" +goto=`awk '{print $1}' $file | $DMENU` #NOTE: it's the job of the script that inserts bookmarks to make sure there are no dupes. +#[ -n "$goto" ] && echo "cmd uri $goto" > $4 +[ -n "$goto" ] && uzblctrl -s $5 -c "cmd uri $goto" |