aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--Makefile27
-rw-r--r--README8
-rwxr-xr-xexamples/data/uzbl/scripts/session.sh8
-rwxr-xr-xexamples/data/uzbl/scripts/uzbl_tabbed.py2
-rw-r--r--tests/Makefile4
-rw-r--r--tests/test-command.c4
-rw-r--r--tests/test-expand.c4
-rwxr-xr-xuzbl-browser9
-rw-r--r--uzbl-core.c (renamed from uzbl.c)4
-rw-r--r--uzbl-core.h (renamed from uzbl.h)2
10 files changed, 42 insertions, 30 deletions
diff --git a/Makefile b/Makefile
index 498791d..8bda961 100644
--- a/Makefile
+++ b/Makefile
@@ -8,43 +8,46 @@ LDFLAGS!=echo `pkg-config --libs gtk+-2.0 webkit-1.0 libsoup-2.4 gthread-2.0` -p
all: uzbl
+uzbl: uzbl-core
+
PREFIX?=$(DESTDIR)/usr/local
# When compiling unit tests, compile uzbl as a library first
-tests: uzbl.o
- $(CC) -DUZBL_LIBRARY -shared -Wl uzbl.o -o ./tests/libuzbl.so
+tests: uzbl-core.o
+ $(CC) -DUZBL_LIBRARY -shared -Wl uzbl-core.o -o ./tests/libuzbl-core.so
cd ./tests/; $(MAKE)
test: uzbl
- ./uzbl --uri http://www.uzbl.org --verbose
+ PATH="`pwd`:$$PATH" ./uzbl-browser --uri http://www.uzbl.org --verbose
test-dev: uzbl
- XDG_DATA_HOME=./examples/data XDG_CONFIG_HOME=./examples/config ./uzbl --uri http://www.uzbl.org --verbose
+ XDG_DATA_HOME=./examples/data XDG_CONFIG_HOME=./examples/config ./uzbl-browser --uri http://www.uzbl.org --verbose
test-dev-dispatched: uzbl
- XDG_DATA_HOME=./examples/data XDG_CONFIG_HOME=./examples/config ./uzbl --uri http://www.uzbl.org --verbose | ./examples/data/uzbl/scripts/event_manager.py
+ XDG_DATA_HOME=./examples/data XDG_CONFIG_HOME=./examples/config ./uzbl-browser --uri http://www.uzbl.org --verbose | ./examples/data/uzbl/scripts/event_manager.py
test-share: uzbl
- XDG_DATA_HOME=${PREFIX}/share/uzbl/examples/data XDG_CONFIG_HOME=${PREFIX}/share/uzbl/examples/config ./uzbl --uri http://www.uzbl.org --verbose
+ XDG_DATA_HOME=${PREFIX}/share/uzbl/examples/data XDG_CONFIG_HOME=${PREFIX}/share/uzbl/examples/config ./uzbl-browser --uri http://www.uzbl.org --verbose
clean:
- rm -f uzbl
- rm -f uzbl.o
+ rm -f uzbl-core
+ rm -f uzbl-core.o
cd ./tests/; $(MAKE) clean
install:
install -d $(PREFIX)/bin
install -d $(PREFIX)/share/uzbl/docs
install -d $(PREFIX)/share/uzbl/examples
- install -m755 uzbl $(PREFIX)/bin/uzbl
cp -rp docs $(PREFIX)/share/uzbl/
cp -rp config.h $(PREFIX)/share/uzbl/docs/
cp -rp examples $(PREFIX)/share/uzbl/
- install -m644 AUTHORS $(PREFIX)/share/uzbl/docs
- install -m644 README $(PREFIX)/share/uzbl/docs
+ install -m755 uzbl-core $(PREFIX)/bin/uzbl-core
+ install -m755 uzbl-browser $(PREFIX)/bin/uzbl-browser
+ install -m644 AUTHORS $(PREFIX)/share/uzbl/docs
+ install -m644 README $(PREFIX)/share/uzbl/docs
uninstall:
- rm -rf $(PREFIX)/bin/uzbl
+ rm -rf $(PREFIX)/bin/uzbl-*
rm -rf $(PREFIX)/share/uzbl
diff --git a/README b/README
index 54366bd..43e9627 100644
--- a/README
+++ b/README
@@ -5,11 +5,11 @@
* people who like nothing from this list: mpd, moc, wmii, dwm, awesome, mutt, pine, vim, dmenu, screen, irssi, weechat, bitlbee
### TO NEW PEOPLE:
-* invoke uzbl --help
-* 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`
+* invoke uzbl-browser --help
+* to get you started: `XDG_DATA_HOME=/usr/share/uzbl/examples/data XDG_CONFIG_HOME=/usr/share/uzbl/examples/config uzbl-browser --uri www.archlinux.org`
* alternatively, copy the above data to your real `$XDG_DATA_HOME` and `$XDG_CONFIG_HOME` directories
* try and study the sample config, read the readme to find out how it works.
-* You can change the url with commands (if you have setup the appropriate keybinds) but to be most effective it's better to do url editing/changing _outside_ of uzbl.
+* You can change the url with commands (if you have setup the appropriate keybinds) but to be most effective it's better to do url editing/changing _outside_ of uzbl-browser.
Eg, you can use the `load_from_*` dmenu based scripts to pick/edit a url or type a new one.
* If you have questions, you are likely to find answers in the FAQ or in the other documentation.
* documentation is in /usr/share/uzbl/docs
@@ -81,7 +81,7 @@ When uzbl forks a new instance (eg "open in new window") it will use the same co
If you made changes to the configuration at runtime, these are not pased on to the child.
### COMMAND SYNTAX
-Uzbl will read commands via standard input, named fifo pipe (if `fifo_dir` is set) and IPC socket (when `socket_dir` is set).
+Uzbl-browser will read commands via standard input, named fifo pipe (if `fifo_dir` is set) and IPC socket (when `socket_dir` is set).
For convenience, uzbl can also be instructed to read commands from a file on startup by using the `-c` option. Indeed, the config file is nothing more than a list of commands.
Each command starts with the name of the command, which must be the first thing on a line; preceding whitespace is not allowed.
diff --git a/examples/data/uzbl/scripts/session.sh b/examples/data/uzbl/scripts/session.sh
index 22d48a2..1059b5e 100755
--- a/examples/data/uzbl/scripts/session.sh
+++ b/examples/data/uzbl/scripts/session.sh
@@ -1,18 +1,18 @@
#!/bin/sh
-# Very simple session manager for uzbl. When called with "endsession" as the
+# Very simple session manager for uzbl-browser. When called with "endsession" as the
# argument, it'll backup $sessionfile, look for fifos in $fifodir and
# instruct each of them to store their current url in $sessionfile and
# terminate themselves. Run with "launch" as the argument and an instance of
-# uzbl will be launched for each stored url. "endinstance" is used internally
+# uzbl-browser will be launched for each stored url. "endinstance" is used internally
# 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:-$HOME/.local/share}/uzbl/session # the file in which the "session" (i.e. urls) are stored
+sessionfile=${XDG_DATA_HOME:-$HOME/.local/share}/uzbl/browser-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.
+UZBL="uzbl-browser -c $configfile" # add custom flags and whatever here.
fifodir=/tmp # remember to change this if you instructed uzbl to put its fifos elsewhere
thisfifo="$4"
diff --git a/examples/data/uzbl/scripts/uzbl_tabbed.py b/examples/data/uzbl/scripts/uzbl_tabbed.py
index 9ffa97d..feae9b9 100755
--- a/examples/data/uzbl/scripts/uzbl_tabbed.py
+++ b/examples/data/uzbl/scripts/uzbl_tabbed.py
@@ -945,7 +945,7 @@ class UzblTabbed:
uri = "--uri %r" % uri
self.tabs[tab] = uzbl
- cmd = 'uzbl -s %s -n %s_%0.2d %s &' % (sid, self.wid, pid, uri)
+ cmd = 'uzbl-browser -s %s -n %s_%0.2d %s &' % (sid, self.wid, pid, uri)
subprocess.Popen([cmd], shell=True) # TODO: do i need close_fds=True ?
# Add gobject timer to make sure the config is pushed when fifo socket
diff --git a/tests/Makefile b/tests/Makefile
index 9db398a..3f63adf 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -1,4 +1,4 @@
-CFLAGS:=-std=c99 -I$(shell pwd)/../ -L$(shell pwd) -luzbl $(shell pkg-config --cflags gtk+-2.0 webkit-1.0 libsoup-2.4 gthread-2.0) -ggdb -Wall -W -DARCH="\"$(shell uname -m)\"" -lgthread-2.0 -DG_ERRORCHECK_MUTEXES -DCOMMIT="\"$(shell git log | head -n1 | sed "s/.* //")\"" $(CPPFLAGS)
+CFLAGS:=-std=c99 -I$(shell pwd)/../ -L$(shell pwd) -luzbl-core $(shell pkg-config --cflags gtk+-2.0 webkit-1.0 libsoup-2.4 gthread-2.0) -ggdb -Wall -W -DARCH="\"$(shell uname -m)\"" -lgthread-2.0 -DG_ERRORCHECK_MUTEXES -DCOMMIT="\"$(shell git log | head -n1 | sed "s/.* //")\"" $(CPPFLAGS)
CFLAGS!=echo -std=c99 `pkg-config --cflags gtk+-2.0 webkit-1.0 libsoup-2.4 gthread-2.0` -ggdb -Wall -W -DARCH='"\""'`uname -m`'"\""' -lgthread-2.0 -DG_ERRORCHECK_MUTEXES -DCOMMIT='"\""'`git log | head -n1 | sed "s/.* //"`'"\""' $(CPPFLAGS)
LDFLAGS:=$(shell pkg-config --libs gtk+-2.0 webkit-1.0 libsoup-2.4 gthread-2.0) -pthread $(LDFLAGS)
@@ -14,4 +14,4 @@ all: $(TEST_PROGS)
clean:
rm -f $(TEST_PROGS)
- rm -f libuzbl.so
+ rm -f libuzbl-core.so
diff --git a/tests/test-command.c b/tests/test-command.c
index aee4bf2..a752ca6 100644
--- a/tests/test-command.c
+++ b/tests/test-command.c
@@ -22,10 +22,10 @@
#include <fcntl.h>
#include <signal.h>
-#include <uzbl.h>
+#include <uzbl-core.h>
#include <config.h>
-extern Uzbl uzbl;
+extern UzblCore uzbl;
void
test_keycmd (void) {
diff --git a/tests/test-expand.c b/tests/test-expand.c
index 2299227..0ced1f4 100644
--- a/tests/test-expand.c
+++ b/tests/test-expand.c
@@ -22,10 +22,10 @@
#include <fcntl.h>
#include <signal.h>
-#include <uzbl.h>
+#include <uzbl-core.h>
#include <config.h>
-extern Uzbl uzbl;
+extern UzblCore uzbl;
extern gchar* expand(char*, guint);
extern void make_var_to_name_hash(void);
diff --git a/uzbl-browser b/uzbl-browser
new file mode 100755
index 0000000..93ba2d7
--- /dev/null
+++ b/uzbl-browser
@@ -0,0 +1,9 @@
+#!/bin/sh
+# this script implements are more useful "browsing experience". make sure to have the event manager in the appropriate place.
+
+if [ x"$XDG_DATA_HOME" != 'x' ]
+then
+ uzbl-core "$@" | $XDG_DATA_HOME/uzbl/scripts/event_manager.py
+else
+ uzbl-core "$@" | $HOME/.local/share/uzbl/scripts/event_manager.py
+fi
diff --git a/uzbl.c b/uzbl-core.c
index 5832a12..ad7dd56 100644
--- a/uzbl.c
+++ b/uzbl-core.c
@@ -58,10 +58,10 @@
#include <sys/uio.h>
#include <sys/ioctl.h>
#include <assert.h>
-#include "uzbl.h"
+#include "uzbl-core.h"
#include "config.h"
-Uzbl uzbl;
+UzblCore uzbl;
/* commandline arguments (set initial values for the state variables) */
const
diff --git a/uzbl.h b/uzbl-core.h
index 8be3a1c..010cbe5 100644
--- a/uzbl.h
+++ b/uzbl-core.h
@@ -174,7 +174,7 @@ typedef struct {
/* group bindings: key -> action */
GHashTable* bindings;
-} Uzbl;
+} UzblCore;
typedef struct {