From 40e17b4d0ef1b9503f21509e697dd4dcb24d2bbf Mon Sep 17 00:00:00 2001 From: Mark Tiefenbruck Date: Fri, 25 Apr 2008 17:56:51 -0700 Subject: some updates for the startup file in modern times --- configure.in | 8 ++++++++ data/Makefile.am | 8 ++++++-- data/overlay | 2 ++ src/Makefile.am | 2 ++ src/fluxbox.cc | 12 ++++++++++-- util/startfluxbox.in | 16 +++++----------- 6 files changed, 33 insertions(+), 15 deletions(-) create mode 100644 data/overlay diff --git a/configure.in b/configure.in index 5744b6c..b25de99 100644 --- a/configure.in +++ b/configure.in @@ -562,6 +562,14 @@ AC_ARG_WITH( AC_SUBST(DEFAULT_APPS) AC_ARG_WITH( + overlay, + [ --with-overlay=path location overlay file (PREFIX/share/fluxbox/overlay)], + DEFAULT_OVERLAY=$with_overlay, + DEFAULT_OVERLAY=\$\(prefix\)/share/fluxbox/overlay +) +AC_SUBST(DEFAULT_OVERLAY) + +AC_ARG_WITH( init, [ --with-init=path location init file (PREFIX/share/fluxbox/init)], DEFAULT_INIT=$with_init, diff --git a/data/Makefile.am b/data/Makefile.am index 4a0bd10..4dde80c 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -7,13 +7,14 @@ DEFAULT_MENU = @DEFAULT_MENU@ DEFAULT_STYLE = @DEFAULT_STYLE@ DEFAULT_KEYS = @DEFAULT_KEYS@ DEFAULT_APPS = @DEFAULT_APPS@ +DEFAULT_OVERLAY = @DEFAULT_OVERLAY@ DEFAULT_INIT = @DEFAULT_INIT@ SUBDIRS= styles CLEANFILES= menu menu.in menu.pre menu.bak init apps MAINTAINERCLEANFILES= Makefile.in -pkgdata_DATA= keys menu init apps -EXTRA_DIST= keys init.in apps.in +pkgdata_DATA= keys menu init apps overlay +EXTRA_DIST= keys init.in apps.in overlay all-local: menu init apps install-pkgdataDATA: @echo "Installing menu file in $(DESTDIR)$(DEFAULT_MENU)" @@ -25,6 +26,9 @@ install-pkgdataDATA: @echo "Installing apps file in $(DESTDIR)$(DEFAULT_APPS)" $(mkinstalldirs) $(DESTDIR)$(dir $(DEFAULT_APPS)) $(INSTALL_DATA) $(srcdir)/apps $(DESTDIR)$(DEFAULT_APPS) + @echo "Installing overlay file in $(DESTDIR)$(DEFAULT_OVERLAY)" + $(mkinstalldirs) $(DESTDIR)$(dir $(DEFAULT_OVERLAY)) + $(INSTALL_DATA) $(srcdir)/overlay $(DESTDIR)$(DEFAULT_OVERLAY) @echo "Installing init file in $(DESTDIR)$(DEFAULT_INIT)" $(mkinstalldirs) $(DESTDIR)$(dir $(DEFAULT_INIT)) $(INSTALL_DATA) init $(DESTDIR)$(DEFAULT_INIT) diff --git a/data/overlay b/data/overlay new file mode 100644 index 0000000..bb4e91c --- /dev/null +++ b/data/overlay @@ -0,0 +1,2 @@ +! The following line will prevent styles from setting the background. +! background: none diff --git a/src/Makefile.am b/src/Makefile.am index 8fe65a6..0fc5a7a 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -28,6 +28,7 @@ DEFAULT_MENU=@DEFAULT_MENU@ DEFAULT_STYLE=@DEFAULT_STYLE@ DEFAULT_KEYSFILE=@DEFAULT_KEYS@ DEFAULT_APPSFILE=@DEFAULT_APPS@ +DEFAULT_OVERLAY=@DEFAULT_OVERLAY@ DEFAULT_INITFILE=@DEFAULT_INIT@ PROGRAM_PREFIX=@program_prefix@ PROGRAM_SUFFIX=@program_suffix@ @@ -46,6 +47,7 @@ defaults.hh: Makefile echo '#define DEFAULTSTYLE "$(DEFAULT_STYLE)"'; \ echo '#define DEFAULTKEYSFILE "$(DEFAULT_KEYSFILE)"'; \ echo '#define DEFAULT_APPSFILE "$(DEFAULT_APPSFILE)"'; \ + echo '#define DEFAULT_OVERLAY "$(DEFAULT_OVERLAY)"'; \ echo '#define DEFAULT_INITFILE "$(DEFAULT_INITFILE)"'; \ echo '#define PROGRAM_PREFIX "$(PROGRAM_PREFIX:NONE=)"'; \ echo '#define PROGRAM_SUFFIX "$(PROGRAM_SUFFIX:NONE=)"'; \ diff --git a/src/fluxbox.cc b/src/fluxbox.cc index 1045430..8fcc194 100644 --- a/src/fluxbox.cc +++ b/src/fluxbox.cc @@ -524,14 +524,16 @@ void Fluxbox::ungrab() { void Fluxbox::setupConfigFiles() { bool create_init = false, create_keys = false, create_menu = false, - create_apps = false; + create_apps = false, create_overlay = false; string dirname = getenv("HOME") + string("/.") + m_RC_PATH + "/"; - string init_file, keys_file, menu_file, slitlist_file, apps_file; + string init_file, keys_file, menu_file, slitlist_file, apps_file, + overlay_file; init_file = dirname + m_RC_INIT_FILE; keys_file = dirname + "keys"; menu_file = dirname + "menu"; apps_file = dirname + "apps"; + overlay_file = dirname + "overlay"; struct stat buf; @@ -547,6 +549,8 @@ void Fluxbox::setupConfigFiles() { create_menu = true; if (stat(apps_file.c_str(), &buf)) create_apps = true; + if (stat(overlay_file.c_str(), &buf)) + create_overlay = true; } else { #ifdef DEBUG @@ -580,6 +584,10 @@ void Fluxbox::setupConfigFiles() { if (create_apps) FbTk::FileUtil::copyFile(DEFAULT_APPSFILE, apps_file.c_str()); + // copy overlay file + if (create_overlay) + FbTk::FileUtil::copyFile(DEFAULT_OVERLAY, overlay_file.c_str()); + // copy init file if (create_init) FbTk::FileUtil::copyFile(DEFAULT_INITFILE, init_file.c_str()); diff --git a/util/startfluxbox.in b/util/startfluxbox.in index ee37675..bf06ec9 100755 --- a/util/startfluxbox.in +++ b/util/startfluxbox.in @@ -37,17 +37,14 @@ else # # Lines starting with a '#' are ignored. -# You can set your favourite wallpaper here if you don't want -# to do it from your style. -# -# fbsetbg -f $HOME/pictures/wallpaper.png -# # This sets a black background -@pkgbindir@/@pkgprefix@fbsetroot@pkgsuffix@ -solid black +@pkgprefix@fbsetroot@pkgsuffix@ -solid black -# This shows the fluxbox-splash-screen -# @pkgprefix@fbsetbg@pkgsuffix@ -C @pkgdatadir@/splash.jpg +# You can set your favourite wallpaper here. You will also need to uncomment the +# line in $HOME/.@pkgprefix@fluxbox@pkgsuffix@/overlay or else your style will override it. +# +# @pkgprefix@fbsetbg@pkgsuffix@ -f $HOME/.@pkgprefix@fluxbox@pkgsuffix@/backgrounds/wallpaper.png # Other examples. Check man xset for details. # @@ -60,9 +57,6 @@ else # Your own fonts-dir: # xset +fp "$HOME/.fonts" # -# Your favourite mouse cursor: -# xsetroot -cursor_name right_ptr -# # Change your keymap: # xmodmap "$HOME/.Xmodmap" -- cgit v0.11.2