summaryrefslogtreecommitdiff
path: root/.uzbl/scripts/mytest.sh
diff options
context:
space:
mode:
authorUrbain Vaes <urbain@vaes.uk>2015-08-11 15:58:37 +0200
committerUrbain Vaes <urbain@vaes.uk>2015-08-11 15:58:37 +0200
commit5e17418f1eef06e97bb621edf53530437df8b14f (patch)
treef87466982929a0d0fead9ec97a5e9b017c76bf9e /.uzbl/scripts/mytest.sh
parent8df9472e0cdbab0d12211c2bc77918e8f515c409 (diff)
Back up several files
Diffstat (limited to '.uzbl/scripts/mytest.sh')
-rwxr-xr-x.uzbl/scripts/mytest.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/.uzbl/scripts/mytest.sh b/.uzbl/scripts/mytest.sh
new file mode 100755
index 0000000..f310e49
--- /dev/null
+++ b/.uzbl/scripts/mytest.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+. "$UZBL_UTIL_DIR/uzbl-dir.sh"
+
+>> "$UZBL_BOOKMARKS_FILE" || exit 1
+
+which zenity >/dev/null 2>&1 || exit 2
+
+tags="$( zenity --entry --text="Enter space-separated tags for bookmark $UZBL_URI:" )"
+exitstatus="$?"
+[ "$exitstatus" -eq 0 ] || exit "$exitstatus"
+
+# TODO: check if already exists, if so, and tags are different: ask if you want to replace tags
+echo "$UZBL_URI $tags" >> "$UZBL_BOOKMARKS_FILE"