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>
This commit is contained in:
Arthur Williams
2021-09-19 01:49:56 -07:00
committed by NRK
parent 6ce94e3e3b
commit 675db4bbb6
6 changed files with 63 additions and 34 deletions

10
nsxiv.h
View File

@ -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;