add fbrun to default apps file

This commit is contained in:
Mark Tiefenbruck 2008-04-25 01:36:26 -07:00
parent 79daf5b187
commit 2301968bd9
4 changed files with 33 additions and 6 deletions

View file

@ -553,6 +553,14 @@ AC_ARG_WITH(
)
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)],

View file

@ -6,14 +6,15 @@ PROGRAM_SUFFIX=@program_suffix@
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-pkgdataDATA:
@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)
@ -33,6 +37,11 @@ init: init.in
-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 \
PREFIX="${prefix}" \

View file

@ -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 @@ defaults.hh: Makefile
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=)"'; \

View file

@ -523,13 +523,15 @@ void Fluxbox::ungrab() {
*/
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 @@ void Fluxbox::setupConfigFiles() {
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
@ -572,6 +576,10 @@ void Fluxbox::setupConfigFiles() {
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)
FbTk::FileUtil::copyFile(DEFAULT_INITFILE, init_file.c_str());