all repos — fluxbox @ 2301968bd96aa9406bf8dab008a5d9e313570ddb

custom fork of the fluxbox windowmanager

add fbrun to default apps file
Mark Tiefenbruck mark@fluxbox.org
commit

2301968bd96aa9406bf8dab008a5d9e313570ddb

parent

79daf5b1877c6fb98b80680b2f320bbbb92a6d63

4 files changed, 33 insertions(+), 6 deletions(-)

jump to
M configure.inconfigure.in

@@ -554,6 +554,14 @@ )

AC_SUBST(DEFAULT_KEYS) AC_ARG_WITH( + apps, + [ --with-apps=path location apps file (PREFIX/share/fluxbox/apps)], + DEFAULT_APPS=$with_apps, + DEFAULT_APPS=\$\(prefix\)/share/fluxbox/apps +) +AC_SUBST(DEFAULT_APPS) + +AC_ARG_WITH( init, [ --with-init=path location init file (PREFIX/share/fluxbox/init)], DEFAULT_INIT=$with_init,
M data/Makefile.amdata/Makefile.am

@@ -6,14 +6,15 @@

DEFAULT_MENU = @DEFAULT_MENU@ DEFAULT_STYLE = @DEFAULT_STYLE@ DEFAULT_KEYS = @DEFAULT_KEYS@ +DEFAULT_APPS = @DEFAULT_APPS@ DEFAULT_INIT = @DEFAULT_INIT@ SUBDIRS= styles -CLEANFILES= menu menu.in menu.pre menu.bak init +CLEANFILES= menu menu.in menu.pre menu.bak init apps MAINTAINERCLEANFILES= Makefile.in -pkgdata_DATA= keys menu init -EXTRA_DIST= keys init.in -all-local: menu init +pkgdata_DATA= keys menu init apps +EXTRA_DIST= keys init.in apps.in +all-local: menu init apps install-pkgdataDATA: @echo "Installing menu file in $(DESTDIR)$(DEFAULT_MENU)" $(mkinstalldirs) $(DESTDIR)$(dir $(DEFAULT_MENU))

@@ -21,6 +22,9 @@ $(INSTALL_DATA) menu $(DESTDIR)$(DEFAULT_MENU)

@echo "Installing keys file in $(DESTDIR)$(DEFAULT_KEYS)" $(mkinstalldirs) $(DESTDIR)$(dir $(DEFAULT_KEYS)) $(INSTALL_DATA) $(srcdir)/keys $(DESTDIR)$(DEFAULT_KEYS) + @echo "Installing apps file in $(DESTDIR)$(DEFAULT_APPS)" + $(mkinstalldirs) $(DESTDIR)$(dir $(DEFAULT_APPS)) + $(INSTALL_DATA) $(srcdir)/apps $(DESTDIR)$(DEFAULT_APPS) @echo "Installing init file in $(DESTDIR)$(DEFAULT_INIT)" $(mkinstalldirs) $(DESTDIR)$(dir $(DEFAULT_INIT)) $(INSTALL_DATA) init $(DESTDIR)$(DEFAULT_INIT)

@@ -32,6 +36,11 @@ @regex_cmd@ -e "s,@pkgdatadir@,$(pkgdatadir),g" \

-e "s,@pkgprefix@,$(PROGRAM_PREFIX:NONE=),g" \ -e "s,@pkgsuffix@,$(PROGRAM_SUFFIX:NONE=),g" \ -e "s,@default_style@,$(DEFAULT_STYLE),g" $(srcdir)/init.in > init + +apps: apps.in + @regex_cmd@ -e "s,@pkgdatadir@,$(pkgdatadir),g" \ + -e "s,@pkgprefix@,$(PROGRAM_PREFIX:NONE=),g" \ + -e "s,@pkgsuffix@,$(PROGRAM_SUFFIX:NONE=),g" $(srcdir)/apps.in > apps menu: ../util/fluxbox-generate_menu env MENUFILENAME=menu \
M src/Makefile.amsrc/Makefile.am

@@ -27,6 +27,7 @@ SUBDIRS= FbTk

DEFAULT_MENU=@DEFAULT_MENU@ DEFAULT_STYLE=@DEFAULT_STYLE@ DEFAULT_KEYSFILE=@DEFAULT_KEYS@ +DEFAULT_APPSFILE=@DEFAULT_APPS@ DEFAULT_INITFILE=@DEFAULT_INIT@ PROGRAM_PREFIX=@program_prefix@ PROGRAM_SUFFIX=@program_suffix@

@@ -44,6 +45,7 @@ echo ''; \

echo '#define DEFAULTMENU "$(DEFAULT_MENU)"'; \ echo '#define DEFAULTSTYLE "$(DEFAULT_STYLE)"'; \ echo '#define DEFAULTKEYSFILE "$(DEFAULT_KEYSFILE)"'; \ + echo '#define DEFAULT_APPSFILE "$(DEFAULT_APPSFILE)"'; \ echo '#define DEFAULT_INITFILE "$(DEFAULT_INITFILE)"'; \ echo '#define PROGRAM_PREFIX "$(PROGRAM_PREFIX:NONE=)"'; \ echo '#define PROGRAM_SUFFIX "$(PROGRAM_SUFFIX:NONE=)"'; \
M src/fluxbox.ccsrc/fluxbox.cc

@@ -523,13 +523,15 @@ home directory

*/ void Fluxbox::setupConfigFiles() { - bool create_init = false, create_keys = false, create_menu = false; + bool create_init = false, create_keys = false, create_menu = false, + create_apps = false; string dirname = getenv("HOME") + string("/.") + m_RC_PATH + "/"; - string init_file, keys_file, menu_file, slitlist_file; + string init_file, keys_file, menu_file, slitlist_file, apps_file; init_file = dirname + m_RC_INIT_FILE; keys_file = dirname + "keys"; menu_file = dirname + "menu"; + apps_file = dirname + "apps"; struct stat buf;

@@ -543,6 +545,8 @@ if (stat(keys_file.c_str(), &buf))

create_keys = true; if (stat(menu_file.c_str(), &buf)) create_menu = true; + if (stat(apps_file.c_str(), &buf)) + create_apps = true; } else { #ifdef DEBUG

@@ -571,6 +575,10 @@

// copy menu configuration if (create_menu) FbTk::FileUtil::copyFile(DEFAULTMENU, menu_file.c_str()); + + // copy apps file + if (create_apps) + FbTk::FileUtil::copyFile(DEFAULT_APPSFILE, apps_file.c_str()); // copy init file if (create_init)