aboutsummaryrefslogtreecommitdiff
Allow the configuration file and theme directory to be specified at run time.

Patch by Eelco Dolstra, from Nixpkgs.
---
 app.cpp | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/app.cpp b/app.cpp
index 237477d..735df9c 100644
--- a/app.cpp
+++ b/app.cpp
@@ -285,7 +285,9 @@ void App::Run()
 	if ( cfg == 0 )
 	{
 		cfg = new Cfg;
-		cfg->readConf(CFGFILE);
+		const char* cfgfile = getenv("SLIM_CFGFILE");
+		if (!cfgfile) cfgfile = CFGFILE;
+		cfg->readConf(cfgfile);
 	}
 	string themebase = "";
 	string themefile = "";
@@ -297,7 +299,9 @@ void App::Run()
 	}
 	else
 	{
-		themebase = string(THEMESDIR) + "/";
+		const char* themesdir = getenv("SLIM_THEMESDIR");
+		if (!themesdir) themesdir = THEMESDIR;
+		themebase = string(themesdir) + "/";
 		themeName = cfg->getOption("current_theme");
 		string::size_type pos;
 		if ((pos = themeName.find(",")) != string::npos)
-- 
2.39.2

mit/gnu/packages/flex.scm?id=0a3aca47d9baed5f3cd25c6a6489a625776fd26e'>gnu: grub: Fix build failure with recent flex....Leo Famulari 2017-05-28gnu: flex: Use the gzip-compressed tarball....Leo Famulari 2017-05-27gnu: packages: flex: Add missing 'lzip' input....Sergei Trofimovich 2017-05-15gnu: flex-2.6.1: Remove variable....Leo Famulari 2017-05-15gnu: flex: Update to 2.6.4....Leo Famulari 2017-03-08gnu: Add flex-2.6.1....Leo Famulari 2017-02-28gnu: flex: Update to 2.6.3....Leo Famulari 2016-12-02gnu: flex: Update to 2.6.2....David Craven 2016-10-29Merge branch 'master' into core-updatesLeo Famulari 2016-10-29gnu: Add flex-2.6.1....David Craven 2016-08-27gnu: flex: Fix CVE-2016-6354....Leo Famulari 2016-07-29gnu: Use define-public to export packages....David Craven 2016-01-07gnu: flex: Update to 2.6.0....Efraim Flashner 2015-05-31gnu: flex: Fix native-inputs field....Mark H Weaver 2015-05-21gnu: flex: Add missing quasiquote....Manolis Ragkousis 2015-05-21gnu: flex: Add m4 as a native input....Manolis Ragkousis 2015-03-14gnu: Update packages to use 'non-copyleft' instead of 'bsd-style'....Ludovic Courtès