From 25d9df6fea52d905008753b71b178c6343a52e0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Sat, 9 Jan 2016 11:53:52 +0100 Subject: [PATCH] Make default command configurable via config.def.h --- abduco.c | 2 +- config.def.h | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/abduco.c b/abduco.c index 7a9012e..8fdc404 100644 --- a/abduco.c +++ b/abduco.c @@ -576,7 +576,7 @@ int main(int argc, char *argv[]) { char *default_cmd[4] = { "/bin/sh", "-c", getenv("ABDUCO_CMD"), NULL }; if (!default_cmd[2]) { - default_cmd[0] = "dvtm"; + default_cmd[0] = ABDUCO_CMD; default_cmd[1] = NULL; } diff --git a/config.def.h b/config.def.h index 5b6c88e..ae9bfbc 100644 --- a/config.def.h +++ b/config.def.h @@ -1,6 +1,9 @@ +/* default command to execute if non is given and $ABDUCO_CMD is unset */ +#define ABDUCO_CMD "dvtm" +/* default detach key, can be overriden at run time using -e option */ static char KEY_DETACH = CTRL('\\'); +/* redraw key to send a SIGWINCH signal to underlying process (unused by default) */ static char KEY_REDRAW = 0; - /* Where to place the "abduco" directory storing all session socket files. * The first directory to succeed is used. */ static struct Dir {