aboutsummaryrefslogtreecommitdiffhomepage
path: root/extra
diff options
context:
space:
mode:
authorGravatar Dieter Plaetinck <dieter@plaetinck.be>2009-04-26 16:02:06 +0200
committerGravatar Dieter Plaetinck <dieter@plaetinck.be>2009-04-26 16:02:06 +0200
commit7563101f66634c77f0d6878473cc6e46a7e3ff59 (patch)
tree5142501ad22fadff939dcc8a4360fb98861301b7 /extra
parent9474bb8edd588e458dff418e5aaec44cc735f851 (diff)
better documented how scripts should work + refactored sample implementations
Diffstat (limited to 'extra')
-rwxr-xr-x[-rw-r--r--]extra/download.sh3
-rwxr-xr-xextra/history.sh3
-rwxr-xr-x[-rw-r--r--]extra/insert_bookmark.sh4
-rwxr-xr-x[-rw-r--r--]extra/load_url_from_bookmarks.sh2
-rwxr-xr-xextra/load_url_from_history.sh2
5 files changed, 7 insertions, 7 deletions
diff --git a/extra/download.sh b/extra/download.sh
index 90d0a9f..ff3d8db 100644..100755
--- a/extra/download.sh
+++ b/extra/download.sh
@@ -1,3 +1,2 @@
#!/bin/bash
-# $1 = url of file to download
-wget $1
+wget $5
diff --git a/extra/history.sh b/extra/history.sh
new file mode 100755
index 0000000..4047476
--- /dev/null
+++ b/extra/history.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+echo "$7 $5" >> /tmp/uzbl.history
diff --git a/extra/insert_bookmark.sh b/extra/insert_bookmark.sh
index 3df6086..083a4b4 100644..100755
--- a/extra/insert_bookmark.sh
+++ b/extra/insert_bookmark.sh
@@ -1,11 +1,9 @@
#!/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"`
+entry=`zenity --entry --text="Add bookmark. add tags at the end, separated by commas" --entry-text="$5"`
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
index dfbbf9a..52e14e2 100644..100755
--- a/extra/load_url_from_bookmarks.sh
+++ b/extra/load_url_from_bookmarks.sh
@@ -1,4 +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
+[ -n "$goto" ] && echo "uri $goto" > $4
diff --git a/extra/load_url_from_history.sh b/extra/load_url_from_history.sh
index bcc2362..559e257 100755
--- a/extra/load_url_from_history.sh
+++ b/extra/load_url_from_history.sh
@@ -1,4 +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
+[ -n "$goto" ] && echo "uri $goto" > $4