diff options
author | Barrucadu <mike@barrucadu.co.uk> | 2009-04-27 20:34:52 +0100 |
---|---|---|
committer | Barrucadu <mike@barrucadu.co.uk> | 2009-04-27 20:34:52 +0100 |
commit | f9b4fb0a91c06ad7c492cee9200307514ce8aaa4 (patch) | |
tree | be2ae83d848a3a8a048d5d2f3e6a7b34c6f075a2 | |
parent | 27ee46d9e44b290002687445c1d366d11c993384 (diff) | |
parent | c401636ea1034edd0832e82d5a80a5930e352db4 (diff) |
Merge branch 'dieter/experimental' into experimental
-rw-r--r-- | Makefile | 12 | ||||
-rw-r--r-- | examples/bookmarks | 4 | ||||
-rw-r--r-- | examples/configs/sampleconfig | 41 | ||||
-rw-r--r-- | examples/configs/sampleconfig-dev (renamed from sampleconfig) | 10 | ||||
-rwxr-xr-x | examples/scripts/download.sh (renamed from extra/download.sh) | 0 | ||||
-rwxr-xr-x | examples/scripts/history.sh | 4 | ||||
-rwxr-xr-x | examples/scripts/insert_bookmark.sh (renamed from extra/insert_bookmark.sh) | 8 | ||||
-rwxr-xr-x | examples/scripts/load_url_from_bookmarks.sh | 12 | ||||
-rwxr-xr-x | examples/scripts/load_url_from_history.sh (renamed from extra/load_url_from_history.sh) | 2 | ||||
-rwxr-xr-x | extra/history.sh | 3 | ||||
-rwxr-xr-x | extra/load_url_from_bookmarks.sh | 4 |
11 files changed, 83 insertions, 17 deletions
@@ -5,15 +5,19 @@ all: uzbl test: ./uzbl --uri http://www.uzbl.org +test-config: + ./uzbl --uri http://www.uzbl.org --config examples/configs/sampleconfig-dev + +test-config-real: + ./uzbl --uri http://www.uzbl.org --config /usr/share/uzbl/examples/configs/sampleconfig + clean: rm -f uzbl install: install -d $(DESTDIR)/usr/bin install -d $(DESTDIR)/usr/share/uzbl/docs - install -d $(DESTDIR)/usr/share/uzbl/examples/scripts - install -d $(DESTDIR)/usr/share/uzbl/examples/configs + install -d $(DESTDIR)/usr/share/uzbl/examples install -D -m755 uzbl $(DESTDIR)/usr/bin/uzbl - install -D -m644 extra/* $(DESTDIR)/usr/share/uzbl/examples/scripts - install -D -m644 sampleconfig $(DESTDIR)/usr/share/uzbl/examples/configs + cp -ax examples $(DESTDIR)/usr/share/uzbl/ install -D -m644 README $(DESTDIR)/usr/share/uzbl/docs diff --git a/examples/bookmarks b/examples/bookmarks new file mode 100644 index 0000000..13fcd48 --- /dev/null +++ b/examples/bookmarks @@ -0,0 +1,4 @@ +http://www.archlinux.org linux arch +http://www.uzbl.org uzbl browser +http://dieter.plaetinck.be uzbl +http://www.icanhascheezburger.com lolcats fun diff --git a/examples/configs/sampleconfig b/examples/configs/sampleconfig new file mode 100644 index 0000000..b92acc2 --- /dev/null +++ b/examples/configs/sampleconfig @@ -0,0 +1,41 @@ + +# example uzbl config. in a real config, we should obey the xdg spec + +# all keys in the behavior group are optional. if not set, the corresponding behavior is disabed. +# bindings_internal denote keys to trigger actions internally in uzbl +# bindings_external denote keys to trigger scripts outside uzbl + +# keyboard behavior is vimstyle by default (all actions -> 1 key). set +# always_insert_mode to always be in insert mode and disable going out of it. +# if you do this, make sure you've set a modkey so you can reach the actions +# from insert mode by combining them with the modkey + +[behavior] +history_handler = /bin/bash /usr/share/uzbl/examples/scripts/history.sh +download_handler = /bin/bash /usr/share/uzbl/examples/scripts/download.sh +fifo_dir = /tmp +always_insert_mode = 0 +modkey = Mod1 +show_status = 1 +status_top = 0 + +[bindings_internal] +back = b +forward = m +stop = s +refresh = r +reload = R +home = h +follow_link_here = f +follow_link_new_tab = F +follow_link_new_window = w +zoom_in = + +zoom_out = - +toggle_status = t + +[bindings_external] +/bin/bash /usr/share/uzbl/examples/scripts/insert_bookmark.sh = B +/bin/bash /usr/share/uzbl/examples/scripts/load_url_from_history.sh = u +/bin/bash /usr/share/uzbl/examples/scripts/load_url_from_bookmarks.sh = U + +[network] diff --git a/sampleconfig b/examples/configs/sampleconfig-dev index 17bacd1..f7f3bb7 100644 --- a/sampleconfig +++ b/examples/configs/sampleconfig-dev @@ -11,8 +11,8 @@ # from insert mode by combining them with the modkey [behavior] -history_handler = /bin/bash ./extra/history.sh -download_handler = /bin/bash ./extra/download.sh +history_handler = /bin/bash ./examples/scripts/history.sh +download_handler = /bin/bash ./examples/scripts/download.sh fifo_dir = /tmp always_insert_mode = 0 modkey = Mod1 @@ -34,8 +34,8 @@ zoom_out = - toggle_status = t [bindings_external] -/bin/bash ./extra/insert_bookmark.sh = B -/bin/bash ./extra/load_url_from_history.sh = u -/bin/bash ./extra/load_url_from_bookmarks.sh = U +/bin/bash ./examples/scripts/insert_bookmark.sh = B +/bin/bash ./examples/scripts/load_url_from_history.sh = u +/bin/bash ./examples/scripts/load_url_from_bookmarks.sh = U [network] diff --git a/extra/download.sh b/examples/scripts/download.sh index ff3d8db..ff3d8db 100755 --- a/extra/download.sh +++ b/examples/scripts/download.sh diff --git a/examples/scripts/history.sh b/examples/scripts/history.sh new file mode 100755 index 0000000..03c568a --- /dev/null +++ b/examples/scripts/history.sh @@ -0,0 +1,4 @@ +#!/bin/bash +#TODO: strip 'http://' part +# you probably really want this in your $XDG_DATA_HOME (eg $HOME/.local/share/uzbl/history) +echo "$7 $5" >> /tmp/uzbl.history diff --git a/extra/insert_bookmark.sh b/examples/scripts/insert_bookmark.sh index 083a4b4..af6ca8a 100755 --- a/extra/insert_bookmark.sh +++ b/examples/scripts/insert_bookmark.sh @@ -1,5 +1,11 @@ #!/bin/bash -file=bookmarks +# you probably want your bookmarks file in your $XDG_DATA_HOME ( eg $HOME/.local/share/uzbl/bookmarks) +if [ -f /usr/share/uzbl/examples/bookmarks ] +then + file=/usr/share/uzbl/examples/bookmarks +else + file=./examples/bookmarks #useful when developing +fi which zenity &>/dev/null || exit 2 diff --git a/examples/scripts/load_url_from_bookmarks.sh b/examples/scripts/load_url_from_bookmarks.sh new file mode 100755 index 0000000..fd9179e --- /dev/null +++ b/examples/scripts/load_url_from_bookmarks.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# you probably want your bookmarks file in your $XDG_DATA_HOME ( eg $HOME/.local/share/uzbl/bookmarks) +if [ -f /usr/share/uzbl/examples/bookmarks ] +then + file=/usr/share/uzbl/examples/bookmarks +else + file=./examples/bookmarks #useful when developing +fi + +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" > $4 diff --git a/extra/load_url_from_history.sh b/examples/scripts/load_url_from_history.sh index 559e257..366aedf 100755 --- a/extra/load_url_from_history.sh +++ b/examples/scripts/load_url_from_history.sh @@ -1,4 +1,6 @@ #!/bin/bash +# you probably really want this in your $XDG_DATA_HOME (eg $HOME/.local/share/uzbl/history) history_file=/tmp/uzbl.history + goto=`awk '{print $3}' $history_file | sort | uniq | dmenu` [ -n "$goto" ] && echo "uri $goto" > $4 diff --git a/extra/history.sh b/extra/history.sh deleted file mode 100755 index afad942..0000000 --- a/extra/history.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -#TODO: strip 'http://' part -echo "$7 $5" >> /tmp/uzbl.history diff --git a/extra/load_url_from_bookmarks.sh b/extra/load_url_from_bookmarks.sh deleted file mode 100755 index 52e14e2..0000000 --- a/extra/load_url_from_bookmarks.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/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" > $4 |