diff --git a/configure.in b/configure.in index 5744b6cd..b25de998 100644 --- a/configure.in +++ b/configure.in @@ -561,6 +561,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)], diff --git a/data/Makefile.am b/data/Makefile.am index 4a0bd10e..4dde80c4 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 00000000..bb4e91c5 --- /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 8fe65a6b..0fc5a7aa 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 10454307..8fcc1949 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 ee376750..bf06ec9f 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"