some updates for the startup file in modern times

This commit is contained in:
Mark Tiefenbruck 2008-04-25 17:56:51 -07:00
parent c13bd3164e
commit 40e17b4d0e
6 changed files with 33 additions and 15 deletions

View file

@ -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)],

View file

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

2
data/overlay Normal file
View file

@ -0,0 +1,2 @@
! The following line will prevent styles from setting the background.
! background: none

View file

@ -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=)"'; \

View file

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

View file

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