diff options
Diffstat (limited to 'extra')
-rw-r--r-- | extra/download.sh | 3 | ||||
-rw-r--r-- | extra/insert_bookmark.sh | 11 | ||||
-rw-r--r-- | extra/load_url_from_bookmarks.sh | 4 | ||||
-rwxr-xr-x | extra/load_url_from_history.sh | 4 |
4 files changed, 22 insertions, 0 deletions
diff --git a/extra/download.sh b/extra/download.sh new file mode 100644 index 0000000..90d0a9f --- /dev/null +++ b/extra/download.sh @@ -0,0 +1,3 @@ +#!/bin/bash +# $1 = url of file to download +wget $1 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 diff --git a/extra/load_url_from_history.sh b/extra/load_url_from_history.sh new file mode 100755 index 0000000..bcc2362 --- /dev/null +++ b/extra/load_url_from_history.sh @@ -0,0 +1,4 @@ +#!/bin/bash +history_file=/tmp/uzbl.history +goto=`awk '{print $3}' $history_file | sort | uniq | dmenu` +[ -n "$goto" ] && echo "uri $goto" > /tmp/uzbl-fifo-name-TODO |