diff options
author | Brendan Taylor <whateley@gmail.com> | 2009-10-12 17:06:24 -0600 |
---|---|---|
committer | Brendan Taylor <whateley@gmail.com> | 2009-10-12 17:06:24 -0600 |
commit | 87979aa993c4c73374999ca420c8af09fe47ca13 (patch) | |
tree | 467cd51defef4e570b30f9e134a9d46ab333e079 /uzbl-browser | |
parent | d2d73ad463f3d9f1c673d37457af159947b3faac (diff) | |
parent | 1769b555deae08e7bbe9466ff650ef37200e8e4c (diff) |
Merge remote branch 'dieterbe/experimental'
Conflicts:
uzbl-core.c
Diffstat (limited to 'uzbl-browser')
-rwxr-xr-x | uzbl-browser | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/uzbl-browser b/uzbl-browser new file mode 100755 index 0000000..202db11 --- /dev/null +++ b/uzbl-browser @@ -0,0 +1,38 @@ +#!/bin/sh +# this script implements are more useful "browsing experience". +# We are assuming you want to use the event_manager.py and cookie_daemon.py. +# So, you must have them in the appropriate place, and cookie_daemon_socket must be configured in the default location + +# Also, we assume existence of fifo/socket == correctly functioning cookie_daemon/event_manager. +# Checking correct functioning of the daemons here would be too complex here, and it's not implemented in uzbl-core either. +# But this shouldn't cause much problems.. + + +if [ -z "$XDG_DATA_HOME" ] +then + XDG_DATA_HOME=$HOME/.local/share +fi + +if [ -z "$XDG_CACHE_HOME" ] +then + XDG_CACHE_HOME=$HOME/.cache +fi + +if [ ! -S $XDG_CACHE_HOME/uzbl/cookie_daemon_socket ] +then + $XDG_DATA_HOME/uzbl/scripts/cookie_daemon.py +fi + + +SOCKET_ID="$RANDOM$RANDOM" +SOCKET_DIR="/tmp" +SOCKET_PATH="$SOCKET_DIR/uzbl_socket_$SOCKET_ID" + +uzbl-core "$@" -n $SOCKET_ID & +$XDG_DATA_HOME/uzbl/scripts/event_manager.py -vs $SOCKET_PATH + +# TODO: make posix sh compliant. [ -S ] is said to not work. what about test -S ? +if [[ -S $SOCKETPATH ]] +then + rm $SOCKET_PATH +fi |