aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples/data/scripts/formfiller.sh
diff options
context:
space:
mode:
authorGravatar Ben Boeckel <MathStuf@gmail.com>2010-08-21 11:37:25 -0400
committerGravatar Ben Boeckel <MathStuf@gmail.com>2010-10-02 11:56:29 -0400
commit8eed5f24a0d40574433c3f3a945e6aac75e06aba (patch)
tree645929e6973c68958196a60c3ae25423980876a4 /examples/data/scripts/formfiller.sh
parenteeab3def726000c36cc0ba36ca0506b2eecbaf49 (diff)
Migrate to using the dmenu util script
Diffstat (limited to 'examples/data/scripts/formfiller.sh')
-rwxr-xr-xexamples/data/scripts/formfiller.sh19
1 files changed, 6 insertions, 13 deletions
diff --git a/examples/data/scripts/formfiller.sh b/examples/data/scripts/formfiller.sh
index 2c792bc..cf8e46b 100755
--- a/examples/data/scripts/formfiller.sh
+++ b/examples/data/scripts/formfiller.sh
@@ -37,22 +37,15 @@
# something else (or empty): if file not available: new, otherwise load.
#
-# config dmenu colors and prompt
-NB="#0f0f0f"
-NF="#4e7093"
-SB="#003d7c"
-SF="#3a9bff"
-
-if [ "$(dmenu --help 2>&1 | grep lines)x" != "x" ]; then
- LINES=" -l 3 "
-else
- LINES=""
-fi
+DMENU_ARGS="-i"
+DMENU_SCHEMA="formfiller"
+DMENU_LINES="3"
+DMENU_PROMPT="Choose profile"
+source $UZBL_UTIL_DIR/dmenu.sh
source $UZBL_UTIL_DIR/uzbl-args.sh
source $UZBL_UTIL_DIR/uzbl-dir.sh
-PROMPT="Choose profile"
MODELINE="> vim:ft=formfiller"
[ -d "$(dirname $UZBL_FORMS_DIR)" ] || exit 1
@@ -139,7 +132,7 @@ if [ "$action" = 'load' ]; then
if [ $(cat $UZBL_FORMS_DIR/$domain | grep "!profile" | wc -l) -gt 1 ]; then
menu=$(cat $UZBL_FORMS_DIR/$domain | \
sed -n 's/^!profile=\([^[:blank:]]\+\)/\1/p')
- option=$(echo -e -n "$menu" | dmenu ${LINES} -nb "${NB}" -nf "${NF}" -sb "${SB}" -sf "${SF}" -p "${PROMPT}")
+ option=$(echo -e -n "$menu" | $DMENU)
fi
# Remove comments