summaryrefslogtreecommitdiff
path: root/src/drun.c
diff options
context:
space:
mode:
authorPhil Jones <philj56@gmail.com>2022-10-22 22:21:51 +0100
committerPhil Jones <philj56@gmail.com>2022-10-22 22:21:51 +0100
commit5200786c42e17eda4e85684a263ace5abc9a1266 (patch)
tree9098a09a9fecccb34e8f9dd62775755dc6697d4b /src/drun.c
parentfdcda651241ace04d895b9efa77d261029e0da68 (diff)
Add warning when no terminal is set.
Diffstat (limited to 'src/drun.c')
-rw-r--r--src/drun.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/drun.c b/src/drun.c
index 9c6ead8..01d2d1d 100644
--- a/src/drun.c
+++ b/src/drun.c
@@ -332,8 +332,14 @@ void drun_print(const char *filename, const char *terminal_command)
*/
bool terminal = g_key_file_get_boolean(file, group, "Terminal", NULL);
if (terminal) {
- fputs(terminal_command, stdout);
- fputc(' ', stdout);
+ if (terminal_command[0] == '\0') {
+ log_warning("Terminal application launched, but no terminal is set.\n");
+ log_warning("This probably isn't what you want.\n");
+ log_warning("See the --terminal option documentation in the man page.\n");
+ } else {
+ fputs(terminal_command, stdout);
+ fputc(' ', stdout);
+ }
}
/* Build the command line from our vector. */