== SYNOPSIS
-i3
+i3 [-c configfile]
== DESCRIPTION
== FILES
-=== i3.config
+=== ~/.i3/config
-When starting, i3 looks for i3.config in the current working directory and loads the
-configuration. At the moment, you can specify only the path to your favorite terminal
-emulator, the font and keybindings.
+When starting, i3 looks for ~/.i3/config and loads the configuration. If ~/.i3/config is not found,
+i3 tries /etc/i3/config. You can specify a custom path using the -c option.
+
+At the moment, you can specify only the path to your favorite terminal emulator, the font and keybindings.
At the moment, you have to bind to keycodes (find them out via xev(1)).
export LC_MEASUREMENT=de_DE.ISO8859-15
export LC_IDENTIFICATION=de_DE.ISO8859-15
-exec /usr/bin/i3
+# Enable core dumps in case something goes wrong
+ulimit -c unlimited
+
+# Start i3 and log to ~/.i3/logfile
+echo "Starting at $(date)" >> ~/.i3/logfile
+exec /usr/bin/i3 >> ~/.i3/logfile
-------------------------------------------------------------
== TODO
Here is an overwiew of the most important points:
* IPC
- * a command for toggling layouts/workspaces
* floating
* do something about applications which don’t use _NET_WM_STATE_FULLSCREEN (like xpdf)
#include <assert.h>
#include <limits.h>
-#include <xcb/xcb.h>
-
#include <X11/XKBlib.h>
#include <X11/extensions/XKB.h>
+#include <xcb/xcb.h>
#include <xcb/xcb_wm.h>
#include <xcb/xcb_aux.h>
#include <xcb/xcb_event.h>
#include <xcb/xcb_keysyms.h>
#include <xcb/xcb_icccm.h>
#include <xcb/xinerama.h>
-#include "data.h"
#include "config.h"
-#include "queue.h"
-#include "table.h"
-#include "layout.h"
+#include "data.h"
#include "debug.h"
#include "handlers.h"
+#include "i3.h"
+#include "layout.h"
+#include "queue.h"
+#include "table.h"
#include "util.h"
#include "xcb.h"
#include "xinerama.h"
-#include "i3.h"
/* This is the path to i3, copied from argv[0] when starting up */
char *application_path;
}
int main(int argc, char *argv[], char *env[]) {
- int i, screens;
+ int i, screens, opt;
+ char *override_configpath = NULL;
xcb_connection_t *conn;
xcb_property_handlers_t prophs;
xcb_window_t root;
application_path = sstrdup(argv[0]);
+ while ((opt = getopt(argc, argv, "c:")) != -1) {
+ switch (opt) {
+ case 'c':
+ override_configpath = sstrdup(optarg);
+ break;
+ default:
+ fprintf(stderr, "Usage: %s [-c configfile]\n", argv[0]);
+ exit(EXIT_FAILURE);
+ }
+ }
+
/* Initialize the table data structures for each workspace */
init_table();
byChild = alloc_table();
byParent = alloc_table();
- load_configuration(NULL);
+ load_configuration(override_configpath);
conn = xcb_connect(NULL, &screens);