aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples/data/scripts/load_url_from_bookmarks.sh
diff options
context:
space:
mode:
authorGravatar Ben Boeckel <MathStuf@gmail.com>2010-08-21 11:40:45 -0400
committerGravatar Ben Boeckel <MathStuf@gmail.com>2010-10-02 11:56:29 -0400
commit391ffa73dfa46beea7dff2c9789a5f56a39227c4 (patch)
treebbec771947eeea41a12a630f77179fc2d063d7d4 /examples/data/scripts/load_url_from_bookmarks.sh
parent6c53e3e93b449c5501ef9d046244a71eb36db074 (diff)
Migrate to using uzbl-dir util script
Diffstat (limited to 'examples/data/scripts/load_url_from_bookmarks.sh')
-rwxr-xr-xexamples/data/scripts/load_url_from_bookmarks.sh10
1 files changed, 6 insertions, 4 deletions
diff --git a/examples/data/scripts/load_url_from_bookmarks.sh b/examples/data/scripts/load_url_from_bookmarks.sh
index 3134407..9a955ec 100755
--- a/examples/data/scripts/load_url_from_bookmarks.sh
+++ b/examples/data/scripts/load_url_from_bookmarks.sh
@@ -2,17 +2,19 @@
#NOTE: it's the job of the script that inserts bookmarks to make sure there are no dupes.
-file=${XDG_DATA_HOME:-$HOME/.local/share}/uzbl/bookmarks
-[ -r "$file" ] || exit
+source $UZBL_UTIL_DIR/uzbl-dir.sh
+
+[ -r "$UZBL_BOOKMARKS_FILE" ] || exit 1
+
COLORS=" -nb #303030 -nf khaki -sb #CCFFAA -sf #303030"
if dmenu --help 2>&1 | grep -q '\[-rs\] \[-ni\] \[-nl\] \[-xs\]'; then
DMENU="dmenu -i -xs -rs -l 10" # vertical patch
# show tags as well
- goto=$($DMENU $COLORS < $file | awk '{print $1}')
+ goto=$($DMENU $COLORS < $UZBL_BOOKMARKS_FILE | awk '{print $1}')
else
DMENU="dmenu -i"
# because they are all after each other, just show the url, not their tags.
- goto=$(awk '{print $1}' $file | $DMENU $COLORS)
+ goto=$(awk '{print $1}' $UZBL_BOOKMARKS_FILE | $DMENU $COLORS)
fi
#[ -n "$goto" ] && echo "uri $goto" > $4