aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMark Tiefenbruck <mark@fluxbox.org>2008-04-26 00:56:51 (GMT)
committerMark Tiefenbruck <mark@fluxbox.org>2008-04-26 00:56:51 (GMT)
commit40e17b4d0ef1b9503f21509e697dd4dcb24d2bbf (patch)
tree561e9ff127559c915eea87631859c64a7a1d979a /src
parentc13bd3164e484befdc1dc5950137e0c4b58fa31c (diff)
downloadfluxbox-40e17b4d0ef1b9503f21509e697dd4dcb24d2bbf.zip
fluxbox-40e17b4d0ef1b9503f21509e697dd4dcb24d2bbf.tar.bz2
some updates for the startup file in modern times
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am2
-rw-r--r--src/fluxbox.cc12
2 files changed, 12 insertions, 2 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 8fe65a6..0fc5a7a 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -28,6 +28,7 @@ DEFAULT_MENU=@DEFAULT_MENU@
28DEFAULT_STYLE=@DEFAULT_STYLE@ 28DEFAULT_STYLE=@DEFAULT_STYLE@
29DEFAULT_KEYSFILE=@DEFAULT_KEYS@ 29DEFAULT_KEYSFILE=@DEFAULT_KEYS@
30DEFAULT_APPSFILE=@DEFAULT_APPS@ 30DEFAULT_APPSFILE=@DEFAULT_APPS@
31DEFAULT_OVERLAY=@DEFAULT_OVERLAY@
31DEFAULT_INITFILE=@DEFAULT_INIT@ 32DEFAULT_INITFILE=@DEFAULT_INIT@
32PROGRAM_PREFIX=@program_prefix@ 33PROGRAM_PREFIX=@program_prefix@
33PROGRAM_SUFFIX=@program_suffix@ 34PROGRAM_SUFFIX=@program_suffix@
@@ -46,6 +47,7 @@ defaults.hh: Makefile
46 echo '#define DEFAULTSTYLE "$(DEFAULT_STYLE)"'; \ 47 echo '#define DEFAULTSTYLE "$(DEFAULT_STYLE)"'; \
47 echo '#define DEFAULTKEYSFILE "$(DEFAULT_KEYSFILE)"'; \ 48 echo '#define DEFAULTKEYSFILE "$(DEFAULT_KEYSFILE)"'; \
48 echo '#define DEFAULT_APPSFILE "$(DEFAULT_APPSFILE)"'; \ 49 echo '#define DEFAULT_APPSFILE "$(DEFAULT_APPSFILE)"'; \
50 echo '#define DEFAULT_OVERLAY "$(DEFAULT_OVERLAY)"'; \
49 echo '#define DEFAULT_INITFILE "$(DEFAULT_INITFILE)"'; \ 51 echo '#define DEFAULT_INITFILE "$(DEFAULT_INITFILE)"'; \
50 echo '#define PROGRAM_PREFIX "$(PROGRAM_PREFIX:NONE=)"'; \ 52 echo '#define PROGRAM_PREFIX "$(PROGRAM_PREFIX:NONE=)"'; \
51 echo '#define PROGRAM_SUFFIX "$(PROGRAM_SUFFIX:NONE=)"'; \ 53 echo '#define PROGRAM_SUFFIX "$(PROGRAM_SUFFIX:NONE=)"'; \
diff --git a/src/fluxbox.cc b/src/fluxbox.cc
index 1045430..8fcc194 100644
--- a/src/fluxbox.cc
+++ b/src/fluxbox.cc
@@ -524,14 +524,16 @@ void Fluxbox::ungrab() {
524void Fluxbox::setupConfigFiles() { 524void 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 create_apps = false, create_overlay = false;
528 528
529 string dirname = getenv("HOME") + string("/.") + m_RC_PATH + "/"; 529 string dirname = getenv("HOME") + string("/.") + m_RC_PATH + "/";
530 string init_file, keys_file, menu_file, slitlist_file, apps_file; 530 string init_file, keys_file, menu_file, slitlist_file, apps_file,
531 overlay_file;
531 init_file = dirname + m_RC_INIT_FILE; 532 init_file = dirname + m_RC_INIT_FILE;
532 keys_file = dirname + "keys"; 533 keys_file = dirname + "keys";
533 menu_file = dirname + "menu"; 534 menu_file = dirname + "menu";
534 apps_file = dirname + "apps"; 535 apps_file = dirname + "apps";
536 overlay_file = dirname + "overlay";
535 537
536 struct stat buf; 538 struct stat buf;
537 539
@@ -547,6 +549,8 @@ void Fluxbox::setupConfigFiles() {
547 create_menu = true; 549 create_menu = true;
548 if (stat(apps_file.c_str(), &buf)) 550 if (stat(apps_file.c_str(), &buf))
549 create_apps = true; 551 create_apps = true;
552 if (stat(overlay_file.c_str(), &buf))
553 create_overlay = true;
550 554
551 } else { 555 } else {
552#ifdef DEBUG 556#ifdef DEBUG
@@ -580,6 +584,10 @@ void Fluxbox::setupConfigFiles() {
580 if (create_apps) 584 if (create_apps)
581 FbTk::FileUtil::copyFile(DEFAULT_APPSFILE, apps_file.c_str()); 585 FbTk::FileUtil::copyFile(DEFAULT_APPSFILE, apps_file.c_str());
582 586
587 // copy overlay file
588 if (create_overlay)
589 FbTk::FileUtil::copyFile(DEFAULT_OVERLAY, overlay_file.c_str());
590
583 // copy init file 591 // copy init file
584 if (create_init) 592 if (create_init)
585 FbTk::FileUtil::copyFile(DEFAULT_INITFILE, init_file.c_str()); 593 FbTk::FileUtil::copyFile(DEFAULT_INITFILE, init_file.c_str());