xcb_screen_t *root_screen;
/*
- * Having verboselog() and errorlog() is necessary when using libi3.
+ * Having verboselog(), errorlog() and debuglog() is necessary when using libi3.
*
*/
void verboselog(char *fmt, ...) {
va_end(args);
}
+void debuglog(char *fmt, ...) {
+}
+
/*
* Starts the given application by passing it through a shell. We use double fork
* to avoid zombie processes. As the started application’s parent exits (immediately),
fclose(script);
char *link_path;
+ char *exe_path = get_exe_path(argv0);
sasprintf(&link_path, "%s.nagbar_cmd", script_path);
- symlink(get_exe_path(argv0), link_path);
+ symlink(exe_path, link_path);
char *terminal_cmd;
sasprintf(&terminal_cmd, "i3-sensible-terminal -e %s", link_path);
free(link_path);
free(terminal_cmd);
free(script_path);
+ free(exe_path);
/* TODO: unset flag, re-render */
}
while ((o = getopt_long(argc, argv, options_string, long_options, &option_index)) != -1) {
switch (o) {
case 'v':
- printf("i3-nagbar " I3_VERSION);
+ printf("i3-nagbar " I3_VERSION "\n");
return 0;
case 'f':
FREE(pattern);
uint32_t top_end_x;
uint32_t bottom_start_x;
uint32_t bottom_end_x;
- } __attribute__((__packed__)) strut_partial = {0,};
+ } __attribute__((__packed__)) strut_partial;
+ memset(&strut_partial, 0, sizeof(strut_partial));
strut_partial.top = font.height + 6;
strut_partial.top_start_x = 0;