diff options
author | Mason Larobina <mason.larobina@gmail.com> | 2009-10-15 00:08:45 +0800 |
---|---|---|
committer | Mason Larobina <mason.larobina@gmail.com> | 2009-10-15 00:08:45 +0800 |
commit | fdd8d07eba9e483baf618b6d8fd928fefb8465f3 (patch) | |
tree | 26ea2f4359db95f27ec80224d7f9b13766845eb0 /uzbl-browser | |
parent | 847ddc83ccbd7964898980f3f4dd520937ea3bbe (diff) |
Added multi-instance managing to event_manager.py
1. Moved plugin directory from './examples/data/scripts/plugins' to
'./examples/data/'.
2. Broke up the plugin manager class into two small functions.
3. Removed the handler objects ability to have non-callable handlers
given that there is a perfectly good on_event.py plugin which can
do exactly the same.
4. Gave event_manager daemon abilities similar to the cookie_daemon.
5. Using pid to track the event manager daemons running status.
6. Added the ability to load plugins from multiple locations.
7. Removed all outgoing message queues as this work-around is no longer
required after the newly added --connect-socket uzbl-core ability.
8. Removed native stdin/fifo reading ability. Use socat if required.
9. Updated uzbl-browser script to load example cookie_daemon if
cookie_daemon is not in $XDG_DATA_HOME/uzbl/scripts/
10. Added a new event_manager.py launcher uzbl-daemon.
11. Updated make test-dev-browser target to test uzbl-daemon also.
12. Added init like {start|stop|restart} to the event manager.
13. Added a fourth 'list' option to {start|stop|..} to list the plugins
and dirs of each plugin that would be loaded by the event manager.
Diffstat (limited to 'uzbl-browser')
-rwxr-xr-x | uzbl-browser | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/uzbl-browser b/uzbl-browser index 202db11..02ea6c9 100755 --- a/uzbl-browser +++ b/uzbl-browser @@ -1,5 +1,5 @@ #!/bin/sh -# this script implements are more useful "browsing experience". +# 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 @@ -10,29 +10,30 @@ if [ -z "$XDG_DATA_HOME" ] then - XDG_DATA_HOME=$HOME/.local/share + export XDG_DATA_HOME=$HOME/.local/share fi if [ -z "$XDG_CACHE_HOME" ] then - XDG_CACHE_HOME=$HOME/.cache + export XDG_CACHE_HOME=$HOME/.cache fi if [ ! -S $XDG_CACHE_HOME/uzbl/cookie_daemon_socket ] then - $XDG_DATA_HOME/uzbl/scripts/cookie_daemon.py + if [ -f "$XDG_DATA_HOME/uzbl/scripts/cookie_daemon.py" ] + then + $XDG_DATA_HOME/uzbl/scripts/cookie_daemon.py + else + /usr/local/share/uzbl/examples/data/uzbl/scripts/cookie_daemon.py + fi fi +DAEMON_SOCKET=$XDG_CACHE_HOME/uzbl/event_daemon +DAEMON_PID=$XDG_CACHE_HOME/uzbl/event_daemon.pid -SOCKET_ID="$RANDOM$RANDOM" -SOCKET_DIR="/tmp" -SOCKET_PATH="$SOCKET_DIR/uzbl_socket_$SOCKET_ID" +#if [ -f "$DAEMON_PID" ] +#then + uzbl-daemon start +#fi -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 +uzbl-core "$@" --connect-socket $DAEMON_SOCKET |