From db009de98a0cfa7ae5ce186a8b13f3cc6dcb0d92 Mon Sep 17 00:00:00 2001 From: Jon Gjengset Date: Thu, 5 Sep 2013 21:26:49 +0100 Subject: Add usage string when run with no arguments --- mktrayicon.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/mktrayicon.c b/mktrayicon.c index 932a5e1..ec337e1 100644 --- a/mktrayicon.c +++ b/mktrayicon.c @@ -179,7 +179,6 @@ static GtkStatusIcon *create_tray_icon(char *start_icon) int main(int argc, char **argv) { char *start_icon = "none"; - char *app = argv[0]; FILE *fifo; pthread_t reader; @@ -190,7 +189,12 @@ int main(int argc, char **argv) } if (argc == 1) { - /* usage */ + printf("Usage: %s [-i ICON] FIFO\n", *argv); + printf("Listen to FIFO for system tray icon specifications\n"); + printf("\n"); + printf(" -i ICON\tUse the specified ICON when initializing\n"); + printf("\n"); + printf("Report bugs at https://github.com/jonhoo/mktrayicon\n"); return 0; } -- cgit