From c0ca161b3a52f84f413c241a58043387a53240f2 Mon Sep 17 00:00:00 2001 From: Dieter Plaetinck Date: Sat, 25 Apr 2009 11:01:08 +0200 Subject: add sample bookmark related scripts --- extra/insert_bookmark.sh | 11 +++++++++++ extra/load_url_from_bookmarks.sh | 4 ++++ 2 files changed, 15 insertions(+) create mode 100644 extra/insert_bookmark.sh create mode 100644 extra/load_url_from_bookmarks.sh (limited to 'extra') diff --git a/extra/insert_bookmark.sh b/extra/insert_bookmark.sh new file mode 100644 index 0000000..3df6086 --- /dev/null +++ b/extra/insert_bookmark.sh @@ -0,0 +1,11 @@ +#!/bin/bash +# $1 should be the uri you want to bookmark +file=bookmarks + +[ -z "$1" ] && exit 1 +which zenity &>/dev/null || exit 2 + +entry=`zenity --entry --text="Add bookmark. add tags at the end, separated by commas" --entry-text="$1"` +url=`awk '{print $1}' <<< $entry` +# TODO: check if already exists, if so, and tags are different: ask if you want to replace tags +echo "$entry" >> $file diff --git a/extra/load_url_from_bookmarks.sh b/extra/load_url_from_bookmarks.sh new file mode 100644 index 0000000..dfbbf9a --- /dev/null +++ b/extra/load_url_from_bookmarks.sh @@ -0,0 +1,4 @@ +#!/bin/bash +file=bookmarks +goto=`awk '{print $1}' $history_file | dmenu` #NOTE: it's the job of the script that inserts bookmarks to make sure there are no dupes. +[ -n "$goto" ] && echo "uri $goto" > /tmp/uzbl-fifo-name-TODO -- cgit v1.2.3