From 5200786c42e17eda4e85684a263ace5abc9a1266 Mon Sep 17 00:00:00 2001 From: Phil Jones Date: Sat, 22 Oct 2022 22:21:51 +0100 Subject: Add warning when no terminal is set. --- src/drun.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src') 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. */ -- cgit v1.2.3