install -D -m755 uzbl $(DESTDIR)/usr/bin/uzbl
install -D -m755 uzblctrl $(DESTDIR)/usr/bin/uzblctrl
cp -ax docs $(DESTDIR)/usr/share/uzbl/
+ cp -ax config.h $(DESTDIR)/usr/share/uzbl/docs/
cp -ax examples $(DESTDIR)/usr/share/uzbl/
install -D -m644 AUTHORS $(DESTDIR)/usr/share/uzbl/docs
install -D -m644 README $(DESTDIR)/usr/share/uzbl/docs
### CONFIGURATION / CONTROL:
-The general idea is that uzbl by default is very bare bones. you can send it commands to update settings and perform actions, through various interfaces. (TODO: some default settings)
-For examples of the possibilities, please see the sample config(s).
+The general idea is that uzbl by default is very bare bones. you can send it commands to update settings and perform actions, through various interfaces.
+There is a limited default configuration. Please see config.h to see what it contains.
+For examples of the possibilities what you can do, please see the sample config(s).
There are several interfaces to interact with uzbl:
* uzbl --config <filename>: <filename> will be read line by line, and the commands in it will be executed. useful to configure uzbl at startup.
--- /dev/null
+const struct {
+ char *command;
+} default_config[] = {
+{ "bind j = scroll_vert 20"},
+{ "bind k = scroll_vert -20"},
+{ "bind h = scroll_horz -20"},
+{ "bind l = scroll_horz 20"},
+{ "bind << = scroll_begin"},
+{ "bind >> = scroll_end"},
+{ "bind b = back"},
+{ "bind m = forward"},
+{ "bind s = stop "},
+{ "bind r = reload"},
+{ "bind R = reload_ign_cache"},
+{ "bind + = zoom_in"},
+{ "bind - = zoom_out"},
+{ "bind t = toggle_status"},
+{ "bind /* = search %s"},
+{ "bind ?* = search_reverse %s"},
+{ "bind n = search"},
+{ "bind N = search_reverse"},
+{ "bind o _ = uri %s"},
+{ "bind i = toggle_insert_mode"},
+{ "bind ZZ = exit"},
+{ "set reset_command_mode = 1"},
+{ "set status_format = <span background=\"darkblue\" foreground=\"white\"> MODE </span> <span background=\"red\" foreground=\"white\">KEYCMD</span> (LOAD_PROGRESS%) <b>TITLE</b> - Uzbl browser"},
+{ "set title_format_long = KEYCMD MODE TITLE - Uzbl browser <NAME> > SELECTED_URI"},
+{ "set title_format_short = TITLE - Uzbl browser <NAME>"},
+{ NULL }
+};
FAQ
---
-### I just installed uzbl but it doesn't do much. I can load one uri and quit the program but that's it.
-You did not load a configuration. Uzbl does not create a default config file on startup like some other programs do.
+### I just installed uzbl but it doesn't do much. What now?
+Uzbl does not 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.
+Uzbl includes *some* default settings hardcoded, but these are rather limited (some navigation keybinds, statusbar settings, but no history/download handlers etc.)
+Look at config.h to see the default settings.
+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.
Use the --config parameter or save your config as $XDG\_CONFIG\_HOME/uzbl/config to have it auto-loaded.
### Where is the location bar? How do I change the URL ?
* allow to tag , to group instances together
* store uri/tag/name/state in xorg window properties
* split up uzbl.c into multiple files
-* define a basic, simple default config so uzbl is a bit uzbl by default
* shortcuts to focus other instances (see docs/multiple-instances-management)
* password handler (manager)
#include <libsoup/soup.h>
#include <signal.h>
#include "uzbl.h"
-
+#include "config.h"
static Uzbl uzbl;
typedef void (*Command)(WebKitWebView*, GArray *argv);
settings_init () {
State *s = &uzbl.state;
Network *n = &uzbl.net;
- uzbl.behave.reset_command_mode = 1;
+ int i;
+ for (i = 0; default_config[i].command != NULL; i++) {
+ parse_cmd_line(default_config[i].command);
+ }
if (!s->config_file) {
s->config_file = find_xdg_file (0, "/uzbl/config");
if (uzbl.state.verbose)
printf ("No configuration file loaded.\n");
}
- if (!uzbl.behave.status_format)
- set_var_value("status_format", STATUS_DEFAULT);
- if (!uzbl.behave.title_format_long)
- set_var_value("title_format_long", TITLE_LONG_DEFAULT);
- if (!uzbl.behave.title_format_short)
- set_var_value("title_format_short", TITLE_SHORT_DEFAULT);
-
g_signal_connect(n->soup_session, "request-queued", G_CALLBACK(handle_cookies), NULL);
}
*
*/
-#define STATUS_DEFAULT "<span background=\"darkblue\" foreground=\"white\"> MODE </span> <span background=\"red\" foreground=\"white\">KEYCMD</span> (LOAD_PROGRESS%) <b>TITLE</b> - Uzbl browser"
-#define TITLE_LONG_DEFAULT "KEYCMD MODE TITLE - Uzbl browser <NAME> > SELECTED_URI"
-#define TITLE_SHORT_DEFAULT "TITLE - Uzbl browser <NAME>"
#define NOSPLIT ((void*)1)
enum {