summaryrefslogtreecommitdiffstats
path: root/nsxiv.h
diff options
context:
space:
mode:
authorArthur Williams <taaparthur@gmail.com>2021-09-19 10:49:56 +0200
committerNRK <nrk@disroot.org>2021-10-09 22:17:50 +0200
commit675db4bbb646ff51cc3ecc8ba7d587670872580a (patch)
treef0536022677edf2968f770a0dc67a02e074d8b69 /nsxiv.h
parent6ce94e3e3b8cccab0a5cc23c7538ad19626c1c1d (diff)
downloadnsxiv-675db4bbb646ff51cc3ecc8ba7d587670872580a.tar.zst
Make statusbar optional (#95)
libXft and libfontconfig are now optional dependencies which can be disabled via `HAVE_LIBFONTS=0`. Disabling them means disabling the statusbar. This also does not search for freetype2 header if disabled. Co-authored-by: NRK <nrk@disroot.org>
Diffstat (limited to 'nsxiv.h')
-rw-r--r--nsxiv.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/nsxiv.h b/nsxiv.h
index c148b24..716b24d 100644
--- a/nsxiv.h
+++ b/nsxiv.h
@@ -383,7 +383,9 @@ int r_mkdir(char*);
/* window.c */
#include <X11/Xutil.h>
+#if HAVE_LIBFONTS
#include <X11/Xft/Xft.h>
+#endif
enum {
BAR_L_LEN = 512,
@@ -420,11 +422,13 @@ struct win {
Window xwin;
win_env_t env;
- XftColor win_bg;
- XftColor win_fg;
+ unsigned long win_bg;
+ unsigned long win_fg;
+ unsigned long mrk_fg;
+#if HAVE_LIBFONTS
XftColor bar_bg;
XftColor bar_fg;
- XftColor mrk_fg;
+#endif
int x;
int y;