diff options
author | MC <mc@hack.org> | 2010-06-23 11:28:20 +0200 |
---|---|---|
committer | MC <mc@hack.org> | 2010-06-23 11:28:20 +0200 |
commit | df9f53bf97c20d0643ac65143d401d54f42be205 (patch) | |
tree | 7decab4708cacc6e8a84048c81932cb22ae71bc1 | |
parent | 9fcef0c50ba3e655419f3ebf8d876b342c91ed07 (diff) | |
download | mcwm-df9f53bf97c20d0643ac65143d401d54f42be205.zip |
Move terminal variable into struct conf.
-rw-r--r-- | mcwm.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -79,7 +79,6 @@ typedef enum { /* Globals */ xcb_connection_t *conn; /* Connection to X server. */ xcb_screen_t *screen; /* Our current screen. */ -char *terminal = TERMINAL; /* Path to terminal to start. */ xcb_drawable_t focuswin; /* Current focus window. */ struct keys @@ -102,6 +101,7 @@ struct keys struct conf { bool borders; + char *terminal; /* Path to terminal to start. */ } conf; @@ -489,10 +489,10 @@ int start_terminal(void) /* In the second child, now starting terminal. */ - argv[0] = terminal; + argv[0] = conf.terminal; argv[1] = NULL; - if (-1 == execvp(terminal, argv)) + if (-1 == execvp(conf.terminal, argv)) { perror("execve"); exit(1); @@ -1432,6 +1432,7 @@ int main(int argc, char **argv) xcb_drawable_t root; conf.borders = true; + conf.terminal = TERMINAL; while (1) { @@ -1451,7 +1452,7 @@ int main(int argc, char **argv) break; case 't': - terminal = optarg; + conf.terminal = optarg; break; default: |