summary refs log tree commit diff
path: root/calmwm.c
diff options
context:
space:
mode:
authorokan <okan>2017-12-07 16:25:33 +0000
committerokan <okan>2017-12-07 16:25:33 +0000
commita0774f4777a4a94ea4bbc867c16cde3167075f80 (patch)
tree95c8ef80196043b3e7241d63b70d6a7f6e2fbe8c /calmwm.c
parentdd5f9512058799be696477ab01e2e877ff4e7430 (diff)
parent0fc9d47fb407a65fd08e3095fface42eb93ac914 (diff)
downloadcwm-a0774f4777a4a94ea4bbc867c16cde3167075f80.tar.gz
cwm-a0774f4777a4a94ea4bbc867c16cde3167075f80.tar.xz
cwm-a0774f4777a4a94ea4bbc867c16cde3167075f80.zip
cvsimport
* refs/heads/master:
  Original idea from Dimitris Papastamos to move windows to corners a while ago; re-proposed by Julien Steinhauser with an updated diff. Apparently this was in the original calmnwm.
  give command and group menus their own match callbacks
  stash dir into conf since it'll be of use
  organize this a bit better
  spacing
Diffstat (limited to 'calmwm.c')
-rw-r--r--calmwm.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/calmwm.c b/calmwm.c
index 7988273..c3943c4 100644
--- a/calmwm.c
+++ b/calmwm.c
@@ -42,7 +42,6 @@ Atom			 cwmh[CWMH_NITEMS];
 Atom			 ewmh[EWMH_NITEMS];
 struct screen_q		 Screenq = TAILQ_HEAD_INITIALIZER(Screenq);
 struct conf		 Conf;
-const char		*homedir;
 volatile sig_atomic_t	 cwm_status;
 
 static void	sighdlr(int);
@@ -82,16 +81,16 @@ main(int argc, char **argv)
 	if (signal(SIGCHLD, sighdlr) == SIG_ERR)
 		err(1, "signal");
 
-	if ((homedir = getenv("HOME")) == NULL || *homedir == '\0') {
+	if ((Conf.homedir = getenv("HOME")) == NULL || Conf.homedir[0] == '\0') {
 		pw = getpwuid(getuid());
 		if (pw != NULL && pw->pw_dir != NULL && *pw->pw_dir != '\0')
-			homedir = pw->pw_dir;
+			Conf.homedir = pw->pw_dir;
 		else
-			homedir = "/";
+			Conf.homedir = "/";
 	}
 
 	if (conf_file == NULL)
-		xasprintf(&conf_path, "%s/%s", homedir, CONFFILE);
+		xasprintf(&conf_path, "%s/%s", Conf.homedir, CONFFILE);
 	else
 		conf_path = xstrdup(conf_file);