extern bool xcursor_supported, xkb_supported;
extern xcb_window_t root;
extern struct ev_loop *main_loop;
+extern bool only_check_config;
#endif
*
*/
static void start_configerror_nagbar(const char *config_path) {
- fprintf(stderr, "Would start i3-nagscreen now\n");
+ if (only_check_config)
+ return;
+
+ fprintf(stderr, "Starting i3-nagbar due to configuration errors\n");
configerror_pid = fork();
if (configerror_pid == -1) {
warn("Could not fork()");
bool xcursor_supported = true;
bool xkb_supported = true;
+/* This will be set to true when -C is used so that functions can behave
+ * slightly differently. We don’t want i3-nagbar to be started when validating
+ * the config, for example. */
+bool only_check_config = false;
+
/*
* This callback is only a dummy, see xcb_prepare_cb and xcb_check_cb.
* See also man libev(3): "ev_prepare" and "ev_check" - customise your event loop
bool autostart = true;
char *layout_path = NULL;
bool delete_layout_path = false;
- bool only_check_config = false;
bool force_xinerama = false;
bool disable_signalhandler = false;
static struct option long_options[] = {