aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples/scripts/load_url_from_bookmarks.sh
blob: 428695b576f5bcfb7ca3f78f05a5a7c29a6f4b0f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/bash

# you probably want your bookmarks file in your $XDG_DATA_HOME ( eg $HOME/.local/share/uzbl/bookmarks)
if [ -f /usr/share/uzbl/examples/bookmarks ]
then
        file=/usr/share/uzbl/examples/bookmarks
else
        file=./examples/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" ] && uzblctrl -s $4 -c "uri $goto"