all repos — openbox @ 544da8c704c14f2fd2533711dbf710c34d873e32

openbox fork - make it a bit more like ryudo

set up a default rc file, and change teh user rc to ~./openbox/epistrc
Dana Jansens danakj@orodu.net
commit

544da8c704c14f2fd2533711dbf710c34d873e32

parent

13cf497f83b3f37df2d044bd138db9f776a077f1

2 files changed, 26 insertions(+), 2 deletions(-)

jump to
M util/epist/Makefile.amutil/epist/Makefile.am

@@ -1,6 +1,8 @@

# util/epist/Makefile.am for Blackbox - an X11 Window manager -CPPFLAGS= @CPPFLAGS@ @DEBUG@ +DEFAULT_RC=$(pkgdatadir)/epistrc + +CPPFLAGS= @CPPFLAGS@ @DEBUG@ -DDEFAULTRC=\"$(DEFAULT_RC)\" #EXTRA_PROGRAMS = epist bin_PROGRAMS = epist

@@ -16,6 +18,13 @@ MAINTAINERCLEANFILES = Makefile.in

distclean-local: rm -f *\~ .\#* + +install-data-local: epistrc + test -f $(DESTDIR)$(pkgdatadir)/epistrc || \ + $(INSTALL_DATA) epistrc $(DESTDIR)$(pkgdatadir) + +uninstall-am: + rm -f $(DESTDIR)$(pkgdatadir)/epistrc # local dependencies
M util/epist/epist.ccutil/epist/epist.cc

@@ -41,6 +41,16 @@

#ifdef HAVE_LIBGEN_H # include <libgen.h> #endif // HAVE_LIBGEN_H + +#ifdef HAVE_UNISTD_H +# include <sys/types.h> +# include <unistd.h> +#endif // HAVE_UNISTD_H + +#ifdef HAVE_SYS_STAT_H +# include <sys/types.h> +# include <sys/stat.h> +#endif // HAVE_SYS_STAT_H } #include <iostream>

@@ -66,7 +76,12 @@

if (rc_file) _rc_file = rc_file; else - _rc_file = expandTilde("~/.epistrc"); + _rc_file = expandTilde("~/.openbox/epistrc"); + + struct stat buf; + if (0 != stat(_rc_file.c_str(), &buf) || + !S_ISREG(buf.st_mode)) + _rc_file = DEFAULTRC; _xatom = new XAtom(getXDisplay());