diff options
author | Mark Tiefenbruck <mark@fluxbox.org> | 2008-04-25 08:36:26 (GMT) |
---|---|---|
committer | Mark Tiefenbruck <mark@fluxbox.org> | 2008-04-25 08:36:26 (GMT) |
commit | 2301968bd96aa9406bf8dab008a5d9e313570ddb (patch) | |
tree | 98af3fe970dd7883bafbe57d0574b38af4284f6e | |
parent | 79daf5b1877c6fb98b80680b2f320bbbb92a6d63 (diff) | |
download | fluxbox_paul-2301968bd96aa9406bf8dab008a5d9e313570ddb.zip fluxbox_paul-2301968bd96aa9406bf8dab008a5d9e313570ddb.tar.bz2 |
add fbrun to default apps file
-rw-r--r-- | configure.in | 8 | ||||
-rw-r--r-- | data/Makefile.am | 17 | ||||
-rw-r--r-- | src/Makefile.am | 2 | ||||
-rw-r--r-- | src/fluxbox.cc | 12 |
4 files changed, 33 insertions, 6 deletions
diff --git a/configure.in b/configure.in index c58f0fc..5744b6c 100644 --- a/configure.in +++ b/configure.in | |||
@@ -554,6 +554,14 @@ AC_ARG_WITH( | |||
554 | AC_SUBST(DEFAULT_KEYS) | 554 | AC_SUBST(DEFAULT_KEYS) |
555 | 555 | ||
556 | AC_ARG_WITH( | 556 | AC_ARG_WITH( |
557 | apps, | ||
558 | [ --with-apps=path location apps file (PREFIX/share/fluxbox/apps)], | ||
559 | DEFAULT_APPS=$with_apps, | ||
560 | DEFAULT_APPS=\$\(prefix\)/share/fluxbox/apps | ||
561 | ) | ||
562 | AC_SUBST(DEFAULT_APPS) | ||
563 | |||
564 | AC_ARG_WITH( | ||
557 | init, | 565 | init, |
558 | [ --with-init=path location init file (PREFIX/share/fluxbox/init)], | 566 | [ --with-init=path location init file (PREFIX/share/fluxbox/init)], |
559 | DEFAULT_INIT=$with_init, | 567 | DEFAULT_INIT=$with_init, |
diff --git a/data/Makefile.am b/data/Makefile.am index 80fed6a..4a0bd10 100644 --- a/data/Makefile.am +++ b/data/Makefile.am | |||
@@ -6,14 +6,15 @@ PROGRAM_SUFFIX=@program_suffix@ | |||
6 | DEFAULT_MENU = @DEFAULT_MENU@ | 6 | DEFAULT_MENU = @DEFAULT_MENU@ |
7 | DEFAULT_STYLE = @DEFAULT_STYLE@ | 7 | DEFAULT_STYLE = @DEFAULT_STYLE@ |
8 | DEFAULT_KEYS = @DEFAULT_KEYS@ | 8 | DEFAULT_KEYS = @DEFAULT_KEYS@ |
9 | DEFAULT_APPS = @DEFAULT_APPS@ | ||
9 | DEFAULT_INIT = @DEFAULT_INIT@ | 10 | DEFAULT_INIT = @DEFAULT_INIT@ |
10 | 11 | ||
11 | SUBDIRS= styles | 12 | SUBDIRS= styles |
12 | CLEANFILES= menu menu.in menu.pre menu.bak init | 13 | CLEANFILES= menu menu.in menu.pre menu.bak init apps |
13 | MAINTAINERCLEANFILES= Makefile.in | 14 | MAINTAINERCLEANFILES= Makefile.in |
14 | pkgdata_DATA= keys menu init | 15 | pkgdata_DATA= keys menu init apps |
15 | EXTRA_DIST= keys init.in | 16 | EXTRA_DIST= keys init.in apps.in |
16 | all-local: menu init | 17 | all-local: menu init apps |
17 | install-pkgdataDATA: | 18 | install-pkgdataDATA: |
18 | @echo "Installing menu file in $(DESTDIR)$(DEFAULT_MENU)" | 19 | @echo "Installing menu file in $(DESTDIR)$(DEFAULT_MENU)" |
19 | $(mkinstalldirs) $(DESTDIR)$(dir $(DEFAULT_MENU)) | 20 | $(mkinstalldirs) $(DESTDIR)$(dir $(DEFAULT_MENU)) |
@@ -21,6 +22,9 @@ install-pkgdataDATA: | |||
21 | @echo "Installing keys file in $(DESTDIR)$(DEFAULT_KEYS)" | 22 | @echo "Installing keys file in $(DESTDIR)$(DEFAULT_KEYS)" |
22 | $(mkinstalldirs) $(DESTDIR)$(dir $(DEFAULT_KEYS)) | 23 | $(mkinstalldirs) $(DESTDIR)$(dir $(DEFAULT_KEYS)) |
23 | $(INSTALL_DATA) $(srcdir)/keys $(DESTDIR)$(DEFAULT_KEYS) | 24 | $(INSTALL_DATA) $(srcdir)/keys $(DESTDIR)$(DEFAULT_KEYS) |
25 | @echo "Installing apps file in $(DESTDIR)$(DEFAULT_APPS)" | ||
26 | $(mkinstalldirs) $(DESTDIR)$(dir $(DEFAULT_APPS)) | ||
27 | $(INSTALL_DATA) $(srcdir)/apps $(DESTDIR)$(DEFAULT_APPS) | ||
24 | @echo "Installing init file in $(DESTDIR)$(DEFAULT_INIT)" | 28 | @echo "Installing init file in $(DESTDIR)$(DEFAULT_INIT)" |
25 | $(mkinstalldirs) $(DESTDIR)$(dir $(DEFAULT_INIT)) | 29 | $(mkinstalldirs) $(DESTDIR)$(dir $(DEFAULT_INIT)) |
26 | $(INSTALL_DATA) init $(DESTDIR)$(DEFAULT_INIT) | 30 | $(INSTALL_DATA) init $(DESTDIR)$(DEFAULT_INIT) |
@@ -33,6 +37,11 @@ init: init.in | |||
33 | -e "s,@pkgsuffix@,$(PROGRAM_SUFFIX:NONE=),g" \ | 37 | -e "s,@pkgsuffix@,$(PROGRAM_SUFFIX:NONE=),g" \ |
34 | -e "s,@default_style@,$(DEFAULT_STYLE),g" $(srcdir)/init.in > init | 38 | -e "s,@default_style@,$(DEFAULT_STYLE),g" $(srcdir)/init.in > init |
35 | 39 | ||
40 | apps: apps.in | ||
41 | @regex_cmd@ -e "s,@pkgdatadir@,$(pkgdatadir),g" \ | ||
42 | -e "s,@pkgprefix@,$(PROGRAM_PREFIX:NONE=),g" \ | ||
43 | -e "s,@pkgsuffix@,$(PROGRAM_SUFFIX:NONE=),g" $(srcdir)/apps.in > apps | ||
44 | |||
36 | menu: ../util/fluxbox-generate_menu | 45 | menu: ../util/fluxbox-generate_menu |
37 | env MENUFILENAME=menu \ | 46 | env MENUFILENAME=menu \ |
38 | PREFIX="${prefix}" \ | 47 | PREFIX="${prefix}" \ |
diff --git a/src/Makefile.am b/src/Makefile.am index 1d489c1..8fe65a6 100644 --- a/src/Makefile.am +++ b/src/Makefile.am | |||
@@ -27,6 +27,7 @@ SUBDIRS= FbTk | |||
27 | DEFAULT_MENU=@DEFAULT_MENU@ | 27 | DEFAULT_MENU=@DEFAULT_MENU@ |
28 | DEFAULT_STYLE=@DEFAULT_STYLE@ | 28 | DEFAULT_STYLE=@DEFAULT_STYLE@ |
29 | DEFAULT_KEYSFILE=@DEFAULT_KEYS@ | 29 | DEFAULT_KEYSFILE=@DEFAULT_KEYS@ |
30 | DEFAULT_APPSFILE=@DEFAULT_APPS@ | ||
30 | DEFAULT_INITFILE=@DEFAULT_INIT@ | 31 | DEFAULT_INITFILE=@DEFAULT_INIT@ |
31 | PROGRAM_PREFIX=@program_prefix@ | 32 | PROGRAM_PREFIX=@program_prefix@ |
32 | PROGRAM_SUFFIX=@program_suffix@ | 33 | PROGRAM_SUFFIX=@program_suffix@ |
@@ -44,6 +45,7 @@ defaults.hh: Makefile | |||
44 | echo '#define DEFAULTMENU "$(DEFAULT_MENU)"'; \ | 45 | echo '#define DEFAULTMENU "$(DEFAULT_MENU)"'; \ |
45 | echo '#define DEFAULTSTYLE "$(DEFAULT_STYLE)"'; \ | 46 | echo '#define DEFAULTSTYLE "$(DEFAULT_STYLE)"'; \ |
46 | echo '#define DEFAULTKEYSFILE "$(DEFAULT_KEYSFILE)"'; \ | 47 | echo '#define DEFAULTKEYSFILE "$(DEFAULT_KEYSFILE)"'; \ |
48 | echo '#define DEFAULT_APPSFILE "$(DEFAULT_APPSFILE)"'; \ | ||
47 | echo '#define DEFAULT_INITFILE "$(DEFAULT_INITFILE)"'; \ | 49 | echo '#define DEFAULT_INITFILE "$(DEFAULT_INITFILE)"'; \ |
48 | echo '#define PROGRAM_PREFIX "$(PROGRAM_PREFIX:NONE=)"'; \ | 50 | echo '#define PROGRAM_PREFIX "$(PROGRAM_PREFIX:NONE=)"'; \ |
49 | echo '#define PROGRAM_SUFFIX "$(PROGRAM_SUFFIX:NONE=)"'; \ | 51 | echo '#define PROGRAM_SUFFIX "$(PROGRAM_SUFFIX:NONE=)"'; \ |
diff --git a/src/fluxbox.cc b/src/fluxbox.cc index a1896e9..1045430 100644 --- a/src/fluxbox.cc +++ b/src/fluxbox.cc | |||
@@ -523,13 +523,15 @@ void Fluxbox::ungrab() { | |||
523 | */ | 523 | */ |
524 | void Fluxbox::setupConfigFiles() { | 524 | void Fluxbox::setupConfigFiles() { |
525 | 525 | ||
526 | bool create_init = false, create_keys = false, create_menu = false; | 526 | bool create_init = false, create_keys = false, create_menu = false, |
527 | create_apps = false; | ||
527 | 528 | ||
528 | string dirname = getenv("HOME") + string("/.") + m_RC_PATH + "/"; | 529 | string dirname = getenv("HOME") + string("/.") + m_RC_PATH + "/"; |
529 | string init_file, keys_file, menu_file, slitlist_file; | 530 | string init_file, keys_file, menu_file, slitlist_file, apps_file; |
530 | init_file = dirname + m_RC_INIT_FILE; | 531 | init_file = dirname + m_RC_INIT_FILE; |
531 | keys_file = dirname + "keys"; | 532 | keys_file = dirname + "keys"; |
532 | menu_file = dirname + "menu"; | 533 | menu_file = dirname + "menu"; |
534 | apps_file = dirname + "apps"; | ||
533 | 535 | ||
534 | struct stat buf; | 536 | struct stat buf; |
535 | 537 | ||
@@ -543,6 +545,8 @@ void Fluxbox::setupConfigFiles() { | |||
543 | create_keys = true; | 545 | create_keys = true; |
544 | if (stat(menu_file.c_str(), &buf)) | 546 | if (stat(menu_file.c_str(), &buf)) |
545 | create_menu = true; | 547 | create_menu = true; |
548 | if (stat(apps_file.c_str(), &buf)) | ||
549 | create_apps = true; | ||
546 | 550 | ||
547 | } else { | 551 | } else { |
548 | #ifdef DEBUG | 552 | #ifdef DEBUG |
@@ -572,6 +576,10 @@ void Fluxbox::setupConfigFiles() { | |||
572 | if (create_menu) | 576 | if (create_menu) |
573 | FbTk::FileUtil::copyFile(DEFAULTMENU, menu_file.c_str()); | 577 | FbTk::FileUtil::copyFile(DEFAULTMENU, menu_file.c_str()); |
574 | 578 | ||
579 | // copy apps file | ||
580 | if (create_apps) | ||
581 | FbTk::FileUtil::copyFile(DEFAULT_APPSFILE, apps_file.c_str()); | ||
582 | |||
575 | // copy init file | 583 | // copy init file |
576 | if (create_init) | 584 | if (create_init) |
577 | FbTk::FileUtil::copyFile(DEFAULT_INITFILE, init_file.c_str()); | 585 | FbTk::FileUtil::copyFile(DEFAULT_INITFILE, init_file.c_str()); |