Make path configurable
This commit is contained in:
parent
c56dc0f966
commit
e7bf93163d
2
Makefile
2
Makefile
|
@ -26,7 +26,7 @@ install: all
|
||||||
$(INSTALL) -m 0755 i3 $(DESTDIR)/usr/bin/
|
$(INSTALL) -m 0755 i3 $(DESTDIR)/usr/bin/
|
||||||
test -e $(DESTDIR)/etc/i3/config || $(INSTALL) -m 0644 i3.config $(DESTDIR)/etc/i3/config
|
test -e $(DESTDIR)/etc/i3/config || $(INSTALL) -m 0644 i3.config $(DESTDIR)/etc/i3/config
|
||||||
$(INSTALL) -m 0644 i3.desktop $(DESTDIR)/usr/share/xsessions/
|
$(INSTALL) -m 0644 i3.desktop $(DESTDIR)/usr/share/xsessions/
|
||||||
$(MAKE) TOPDIR=$(TOPDIR) -C i3-msg
|
$(MAKE) TOPDIR=$(TOPDIR) -C i3-msg install
|
||||||
|
|
||||||
dist: clean
|
dist: clean
|
||||||
[ ! -d i3-${VERSION} ] || rm -rf i3-${VERSION}
|
[ ! -d i3-${VERSION} ] || rm -rf i3-${VERSION}
|
||||||
|
|
|
@ -53,6 +53,8 @@ struct Config {
|
||||||
const char *terminal;
|
const char *terminal;
|
||||||
const char *font;
|
const char *font;
|
||||||
|
|
||||||
|
const char *ipc_socket_path;
|
||||||
|
|
||||||
/** The modifier which needs to be pressed in combination with your mouse
|
/** The modifier which needs to be pressed in combination with your mouse
|
||||||
* buttons to do things with floating windows (move, resize) */
|
* buttons to do things with floating windows (move, resize) */
|
||||||
uint32_t floating_modifier;
|
uint32_t floating_modifier;
|
||||||
|
|
|
@ -408,6 +408,11 @@ void load_configuration(xcb_connection_t *conn, const char *override_configpath,
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (strcasecmp(key, "ipc-socket") == 0) {
|
||||||
|
config.ipc_socket_path = sstrdup(value);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
die("Unknown configfile option: %s\n", key);
|
die("Unknown configfile option: %s\n", key);
|
||||||
}
|
}
|
||||||
/* now grab all keys again */
|
/* now grab all keys again */
|
||||||
|
|
|
@ -370,7 +370,8 @@ int main(int argc, char *argv[], char *env[]) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Create the UNIX domain socket for IPC */
|
/* Create the UNIX domain socket for IPC */
|
||||||
int ipc_socket = ipc_create_socket("/tmp/i3.s");
|
if (config.ipc_socket_path != NULL) {
|
||||||
|
int ipc_socket = ipc_create_socket(config.ipc_socket_path);
|
||||||
if (ipc_socket == -1) {
|
if (ipc_socket == -1) {
|
||||||
LOG("Could not create the IPC socket, IPC disabled\n");
|
LOG("Could not create the IPC socket, IPC disabled\n");
|
||||||
} else {
|
} else {
|
||||||
|
@ -378,6 +379,7 @@ int main(int argc, char *argv[], char *env[]) {
|
||||||
ev_io_init(ipc_io, ipc_new_client, ipc_socket, EV_READ);
|
ev_io_init(ipc_io, ipc_new_client, ipc_socket, EV_READ);
|
||||||
ev_io_start(loop, ipc_io);
|
ev_io_start(loop, ipc_io);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Handle the events which arrived until now */
|
/* Handle the events which arrived until now */
|
||||||
xcb_check_cb(NULL, NULL, 0);
|
xcb_check_cb(NULL, NULL, 0);
|
||||||
|
|
Loading…
Reference in New Issue