O_NOSSN := 0 # enable session support
O_NOUG := 0 # disable user, group name in status bar
O_CKBOARD := 0 # use checker board (stipple) in detail mode
+O_NOX11 := 0 # disable X11 integration
# convert targets to flags for backwards compatibility
ifneq ($(filter debug,$(MAKECMDGOALS)),)
CPPFLAGS += -DCKBOARD
endif
+ifeq ($(strip $(O_NOX11)),1)
+ CPPFLAGS += -DNOX11
+endif
+
ifeq ($(shell $(PKG_CONFIG) ncursesw && echo 1),1)
CFLAGS_CURSES ?= $(shell $(PKG_CONFIG) --cflags ncursesw)
LDLIBS_CURSES ?= $(shell $(PKG_CONFIG) --libs ncursesw)
O_NOSSN := 0 # enable session support
O_NOUG := 0 # disable user, group name in status bar
O_CKBOARD := 0 # use checker board (stipple) in detail mode
+O_NOX11 := 0 # disable X11 integration
# convert targets to flags for backwards compatibility
ifneq ($(filter debug,$(MAKECMDGOALS)),)
CPPFLAGS += -DCKBOARD
endif
+ifeq ($(strip $(O_NOX11)),1)
+ CPPFLAGS += -DNOX11
+endif
+
ifeq ($(shell $(PKG_CONFIG) ncursesw && echo 1),1)
CFLAGS_CURSES ?= $(shell $(PKG_CONFIG) --cflags ncursesw)
LDLIBS_CURSES ?= $(shell $(PKG_CONFIG) --libs ncursesw)
setdirwatch();
}
+#ifndef NOX11
if (cfg.x11) {
/* Set terminal window title */
r = set_tilde_in_path(path);
if (r)
reset_tilde_in_path(path);
}
+#endif
if (g_state.selmode && lastdir[0])
lastappendpos = selbufpos;
writesel(NULL, 0);
}
+#ifndef NOX11
if (cfg.x11)
plugscript(utils[UTIL_CBCP], F_NOWAIT | F_NOTRACE);
+#endif
if (!nselected)
unlink(selpath);
writesel(pselbuf, selbufpos - 1); /* Truncate NULL from end */
}
+#ifndef NOX11
if (cfg.x11)
plugscript(utils[UTIL_CBCP], F_NOWAIT | F_NOTRACE);
+#endif
continue;
case SEL_SELEDIT:
r = editselection();
r = !r ? MSG_0_SELECTED : MSG_FAILED;
printwait(messages[r], &presel);
} else {
+#ifndef NOX11
if (cfg.x11)
plugscript(utils[UTIL_CBCP], F_NOWAIT | F_NOTRACE);
+#endif
cfg.filtermode ? presel = FILTER : statusbar(path);
}
goto nochange;
presel = FILTER;
clearfilter();
+#ifndef NOX11
/* Show notification on operation complete */
if (cfg.x11)
plugscript(utils[UTIL_NTFY], F_NOWAIT | F_NOTRACE);
+#endif
if (newpath[0] && !access(newpath, F_OK))
xstrsncpy(lastname, xbasename(newpath), NAME_MAX+1);
#endif
" -V show version\n"
" -w place HW cursor on hovered\n"
+#ifndef NOX11
" -x notis, sel to clipboard, xterm title\n"
+#endif
" -h show help\n\n"
"v%s\n%s\n", __func__, VERSION, GENERAL_INFO);
}
static void cleanup(void)
{
+#ifndef NOX11
if (cfg.x11) {
printf("\033[23;0t"); /* reset terminal window title */
fflush(stdout);
}
+#endif
free(selpath);
free(plgpath);
free(cfgpath);
}
#endif
+#ifndef NOX11
if (cfg.x11) {
/* Save terminal window title */
printf("\033[22;0t");
fflush(stdout);
}
+#endif
#ifndef NOMOUSE
if (!initcurses(&mask))