aboutsummaryrefslogtreecommitdiffhomepage
path: root/uzbl-browser
blob: b1205ac73692005065503f3723cf8b8d0a4b310c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/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
	export XDG_DATA_HOME=$HOME/.local/share
fi

if [ -z "$XDG_CACHE_HOME" ]
then
	export XDG_CACHE_HOME=$HOME/.cache
fi

if [ ! -S $XDG_CACHE_HOME/uzbl/cookie_daemon_socket ]
then
	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

#if [ -f "$DAEMON_PID" ]
#then
	uzbl-daemon start
#fi

uzbl-core "$@" --connect-socket $DAEMON_SOCKET 1>/dev/null