aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--AUTHORS1
-rw-r--r--README2
-rw-r--r--docs/FAQ14
-rw-r--r--examples/config/uzbl/config1
-rwxr-xr-xexamples/data/uzbl/scripts/cookies.py7
-rwxr-xr-xexamples/data/uzbl/scripts/cookies.sh5
-rwxr-xr-xexamples/data/uzbl/scripts/formfiller.pl2
-rwxr-xr-xexamples/data/uzbl/scripts/formfiller.sh5
-rwxr-xr-xexamples/data/uzbl/scripts/history.sh4
-rwxr-xr-xexamples/data/uzbl/scripts/insert_bookmark.sh5
-rwxr-xr-xexamples/data/uzbl/scripts/load_url_from_bookmarks.sh4
-rwxr-xr-xexamples/data/uzbl/scripts/load_url_from_history.sh3
-rwxr-xr-xexamples/data/uzbl/scripts/session.sh5
13 files changed, 35 insertions, 23 deletions
diff --git a/AUTHORS b/AUTHORS
index 83b87a1..1253144 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -25,6 +25,7 @@ Contributors:
neutralinsomniac - load_progress = 0 fix
Maximilian Gaß (mxey) - small patches
Abel Camarillo (00z) - make it compile on OpenBSD
+ (israellevin) - toggle_zoom_type
Originaly based on http://trac.webkit.org/browser/trunk/WebKitTools/GtkLauncher/main.c
Which is copyrighted:
diff --git a/README b/README
index 4740b21..aea62ce 100644
--- a/README
+++ b/README
@@ -7,7 +7,7 @@
### TO NEW PEOPLE:
* please read the documentation in /usr/share/uzbl/docs
* invoke uzbl --help
-* to get you started: uzbl --uri 'http://www.archlinux.org' --config /usr/share/uzbl/examples/configs/sampleconfig
+* to get you started: `XDG_DATA_HOME=/usr/share/uzbl/examples/data XDG_CONFIG_HOME=/usr/share/uzbl/examples/config uzbl --uri www.archlinux.org`
* study the sample config, have a look at all the bindings, and note how you can call the scripts to load new url from history and the bookmarks file
* note that there is no url bar. all url editing is supposed to happen _outside_ of uzbl.
For now, you can use the `load_from_*` dmenu based scripts to pick a url or type a new one or write commands into the fifo (see /usr/share/uzbl/docs/CHECKLIST)
diff --git a/docs/FAQ b/docs/FAQ
index ef5df5f..b377607 100644
--- a/docs/FAQ
+++ b/docs/FAQ
@@ -4,11 +4,15 @@ FAQ
### I just installed uzbl but it doesn't do much. What now?
Uzbl includes very limited default settings (statusbar settings, but no keybinds, history/download handlers etc.)
Look at /usr/share/uzbl/docs/config.h to see the default settings.
-Neither does uzbl create a default config file on startup like some other programs do.
-Because we want to give you the freedom to place your config where you want, and to use a config or not.
-Have a look in /usr/share/uzbl/examples/configs to see what you can do. You will probably want to create your own config based on an example config
-so you can add keybinds and to use scripts.
-Use the --config parameter or save your config as $XDG\_CONFIG\_HOME/uzbl/config to have it auto-loaded.
+Neither does uzbl create a default config file on startup like some other programs do because we want to give you the freedom to place your config where you want, and to use a config or not.
+Have a look in /usr/share/uzbl/examples/configs to see what you can do.
+If you save a config as $XDG\_CONFIG\_HOME/uzbl/config it will be loaded automatically.
+Running with the `--verbose` flag on a command line can also be interesting.
+To get you started, try this:
+`XDG_DATA_HOME=/usr/share/uzbl/examples/data XDG_CONFIG_HOME=/usr/share/uzbl/examples/config uzbl`
+It will temporarily override your $XDG\_CONFIG\_HOME and $XDG\_DATA\_HOME
+variables so you can try the sample stuff directly in /usr/share/uzbl/examples.
+If you like what you can do, you can copy the sample stuff into your ~ and edit to your liking.
### Where is the location bar? How do I change the URL ?
Uzbl has no location bar. All changes to the uri (editing of current uri, typing new uri, loading of uri from bookmarks/history/...) happens *outside* of uzbl.
diff --git a/examples/config/uzbl/config b/examples/config/uzbl/config
index bbe3a75..714daa2 100644
--- a/examples/config/uzbl/config
+++ b/examples/config/uzbl/config
@@ -104,6 +104,7 @@ bind r = reload
bind R = reload_ign_cache
bind + = zoom_in
bind - = zoom_out
+bind T = toggle_zoom_type
bind 1 = sh "echo set zoom_level = 1.0 > $4"
bind 2 = sh "echo set zoom_level = 2.0 > $4"
bind t = toggle_status
diff --git a/examples/data/uzbl/scripts/cookies.py b/examples/data/uzbl/scripts/cookies.py
index 3cc7eb0..8d7027b 100755
--- a/examples/data/uzbl/scripts/cookies.py
+++ b/examples/data/uzbl/scripts/cookies.py
@@ -61,7 +61,10 @@ class FakeResponse:
return FakeHeaders(self.argv)
if __name__ == '__main__':
- jar = cookielib.MozillaCookieJar(os.environ['XDG_DATA_HOME']+'/uzbl/cookies.txt')
+ if os.environ['XDG_DATA_HOME']:
+ jar = cookielib.MozillaCookieJar(os.environ['XDG_DATA_HOME']+'/uzbl/cookies.txt')
+ else:
+ jar = cookielib.MozillaCookieJar(os.environ['HOME']+'.local/share/uzbl/cookies.txt')
try:
jar.load()
except:
@@ -79,4 +82,4 @@ if __name__ == '__main__':
res = FakeResponse(sys.argv)
jar.extract_cookies(res,req)
jar.save(ignore_discard=True) # save session cookies too
- #jar.save() # save everything but session cookies \ No newline at end of file
+ #jar.save() # save everything but session cookies
diff --git a/examples/data/uzbl/scripts/cookies.sh b/examples/data/uzbl/scripts/cookies.sh
index 78139d6..56b9c79 100755
--- a/examples/data/uzbl/scripts/cookies.sh
+++ b/examples/data/uzbl/scripts/cookies.sh
@@ -24,10 +24,9 @@
# http://kb.mozillazine.org/Cookies.txt
# don't always append cookies, sometimes we need to overwrite
-cookie_config=$XDG_CONFIG_HOME/uzbl/cookies
+cookie_config=${XDG_CONFIG_HOME:-$HOME/.config}/uzbl/cookies
[ -z "$cookie_config" ] && exit 1
-[ -d "$XDG_DATA_HOME/uzbl" ] || exit 1
-[ -d $XDG_DATA_HOME/uzbl/ ] && cookie_data=$XDG_DATA_HOME/uzbl/cookies.txt
+[ -d ${XDG_DATA_HOME:-$HOME/.local/share}/uzbl/ ] && cookie_data=${XDG_DATA_HOME:-$home/.local/share}/uzbl/cookies.txt || exit 1
notifier=
diff --git a/examples/data/uzbl/scripts/formfiller.pl b/examples/data/uzbl/scripts/formfiller.pl
index c590836..9ac6959 100755
--- a/examples/data/uzbl/scripts/formfiller.pl
+++ b/examples/data/uzbl/scripts/formfiller.pl
@@ -3,7 +3,7 @@
# a slightly more advanced form filler
#
# uses settings file like: $keydir/<domain>
-
+#TODO: fallback to $HOME/.local/share
# user arg 1:
# edit: force editing of the file (fetches if file is missing)
# load: fill forms from file (fetches if file is missing)
diff --git a/examples/data/uzbl/scripts/formfiller.sh b/examples/data/uzbl/scripts/formfiller.sh
index d54c626..bbb9d1a 100755
--- a/examples/data/uzbl/scripts/formfiller.sh
+++ b/examples/data/uzbl/scripts/formfiller.sh
@@ -12,8 +12,9 @@
# something else (or empty): if file not available: new, otherwise load.
-keydir=$XDG_DATA_HOME/uzbl/forms
-[ -z "$keydir" ] && exit 1
+keydir=${XDG_DATA_HOME:-$HOME/.local/share}/uzbl/forms
+[ -d "`dirname $keydir`" ] || exit 1
+[ -d "$keydir" ] || mkdir "$keydir"
#editor=gvim
editor='urxvt -e vim'
diff --git a/examples/data/uzbl/scripts/history.sh b/examples/data/uzbl/scripts/history.sh
index 69f4034..ccc6b40 100755
--- a/examples/data/uzbl/scripts/history.sh
+++ b/examples/data/uzbl/scripts/history.sh
@@ -1,3 +1,5 @@
#!/bin/bash
#TODO: strip 'http://' part
-echo "$8 $6 $7" >> $XDG_DATA_HOME/uzbl/history
+file=${XDG_DATA_HOME:-$HOME/.local/share}/uzbl/history
+[ -d `dirname $file` ] || exit 1
+echo "$8 $6 $7" >> $file
diff --git a/examples/data/uzbl/scripts/insert_bookmark.sh b/examples/data/uzbl/scripts/insert_bookmark.sh
index b3a7011..23c0d31 100755
--- a/examples/data/uzbl/scripts/insert_bookmark.sh
+++ b/examples/data/uzbl/scripts/insert_bookmark.sh
@@ -1,8 +1,7 @@
#!/bin/bash
-# you probably want your bookmarks file in your $XDG_DATA_HOME ( eg $HOME/.local/share/uzbl/bookmarks)
-[ -d "$XDG_DATA_HOME/uzbl" ] || exit 1
-file=$XDG_DATA_HOME/uzbl/bookmarks
+[ -d "${XDG_DATA_HOME:-$HOME/.local/share}/uzbl" ] || exit 1
+file=${XDG_DATA_HOME:-$HOME/.local/share}/uzbl/bookmarks
which zenity &>/dev/null || exit 2
diff --git a/examples/data/uzbl/scripts/load_url_from_bookmarks.sh b/examples/data/uzbl/scripts/load_url_from_bookmarks.sh
index eb04873..78ee726 100755
--- a/examples/data/uzbl/scripts/load_url_from_bookmarks.sh
+++ b/examples/data/uzbl/scripts/load_url_from_bookmarks.sh
@@ -2,8 +2,8 @@
#NOTE: it's the job of the script that inserts bookmarks to make sure there are no dupes.
-file=$XDG_DATA_HOME/uzbl/bookmarks
-[ -z "$file" ] && exit
+file=${XDG_DATA_HOME:-$HOME/.local/share}/uzbl/bookmarks
+[ -r "$file" ] || exit
COLORS=" -nb #303030 -nf khaki -sb #CCFFAA -sf #303030"
if dmenu --help 2>&1 | grep -q '\[-rs\] \[-ni\] \[-nl\] \[-xs\]'
then
diff --git a/examples/data/uzbl/scripts/load_url_from_history.sh b/examples/data/uzbl/scripts/load_url_from_history.sh
index 39ef302..57d634a 100755
--- a/examples/data/uzbl/scripts/load_url_from_history.sh
+++ b/examples/data/uzbl/scripts/load_url_from_history.sh
@@ -1,5 +1,6 @@
#!/bin/bash
-history_file=$XDG_DATA_HOME/uzbl/history
+history_file=${XDG_DATA_HOME:-$HOME/.local/share}/uzbl/history
+[ -r "$history_file" ] || exit 1
# choose from all entries, sorted and uniqued
# goto=`awk '{print $3}' $history_file | sort -u | dmenu -i`
diff --git a/examples/data/uzbl/scripts/session.sh b/examples/data/uzbl/scripts/session.sh
index e2642c7..4dbae55 100755
--- a/examples/data/uzbl/scripts/session.sh
+++ b/examples/data/uzbl/scripts/session.sh
@@ -8,9 +8,10 @@
# and doesn't need to be called manually at any point.
# Add a line like 'bind quit = /path/to/session.sh endsession' to your config
+[ -d ${XDG_DATA_HOME:-$HOME/.local/share}/uzbl ] || exit 1
scriptfile=$0 # this script
-sessionfile=$XDG_DATA_HOME/uzbl/session # the file in which the "session" (i.e. urls) are stored
-configfile=$XDG_DATA_HOME/uzbl/config # uzbl configuration file
+sessionfile=${XDG_DATA_HOME:-$HOME/.local/share}/uzbl/session # the file in which the "session" (i.e. urls) are stored
+configfile=${XDG_DATA_HOME:-$HOME/.local/share}/uzbl/config # uzbl configuration file
UZBL="uzbl -c $configfile" # add custom flags and whatever here.
fifodir=/tmp # remember to change this if you instructed uzbl to put its fifos elsewhere