aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/tybg.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/tybg.c')
-rw-r--r--src/bin/tybg.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/bin/tybg.c b/src/bin/tybg.c
index cc3df43..11969cc 100644
--- a/src/bin/tybg.c
+++ b/src/bin/tybg.c
@@ -7,6 +7,16 @@
#include <Eina.h>
#include "tycommon.h"
+static void
+print_usage(const char *argv0)
+{
+ printf("Usage: %s "HELP_ARGUMENT_SHORT" [-p] [FILE1 FILE2 ...]\n"
+ " Change the terminal background to the given file/uri\n"
+ " -p Make change permanent (stored in config)\n"
+ HELP_ARGUMENT_DOC"\n"
+ "\n",
+ argv0);
+}
int
main(int argc, char **argv)
@@ -14,17 +24,8 @@ main(int argc, char **argv)
int i, perm = 0;
ON_NOT_RUNNING_IN_TERMINOLOGY_EXIT_1();
+ ARGUMENT_ENTRY_CHECK(argc, argv, print_usage);
- if (argc > 1 &&
- (!strcmp(argv[1], "-h") || !strcmp(argv[1], "--help")))
- {
- printf("Usage: %s [-p] [FILE1 FILE2 ...]\n"
- " Change the terminal background to the given file/uri\n"
- " -p Make change permanent (stored in config)\n"
- "\n",
- argv[0]);
- return 0;
- }
if (argc <= 1)
{
char tbuf[32];