gnu: emacs-consult: Fix grammar.
[jackhill/guix/guix.git] / gnu / packages / patches / slim-config.patch
CommitLineData
16686a90
LC
1Allow the configuration file and theme directory to be specified at run time.
2Patch by Eelco Dolstra, from Nixpkgs.
3
4--- slim-1.3.6/app.cpp 2013-10-02 00:38:05.000000000 +0200
5+++ slim-1.3.6/app.cpp 2013-10-15 11:02:55.629263422 +0200
6@@ -200,7 +200,9 @@
7
8 /* Read configuration and theme */
9 cfg = new Cfg;
10- cfg->readConf(CFGFILE);
11+ char *cfgfile = getenv("SLIM_CFGFILE");
12+ if (!cfgfile) cfgfile = CFGFILE;
13+ cfg->readConf(cfgfile);
14 string themebase = "";
15 string themefile = "";
16 string themedir = "";
17@@ -208,7 +210,9 @@
18 if (testing) {
19 themeName = testtheme;
20 } else {
21- themebase = string(THEMESDIR) + "/";
22+ char *themesdir = getenv("SLIM_THEMESDIR");
23+ if (!themesdir) themesdir = THEMESDIR;
24+ themebase = string(themesdir) + "/";
25 themeName = cfg->getOption("current_theme");
26 string::size_type pos;
27 if ((pos = themeName.find(",")) != string::npos) {