billiob pushed a commit to branch master. http://git.enlightenment.org/apps/terminology.git/commit/?id=5b4e6de54a9647284898d7b3b9b751d8a38f9e70
commit 5b4e6de54a9647284898d7b3b9b751d8a38f9e70 Author: Boris Faure <bill...@gmail.com> Date: Sun Feb 15 20:40:54 2015 +0100 tybg: make tybg without argument display the default wallpaper The ty* tools need some loveā¦ --- src/bin/tybg.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/bin/tybg.c b/src/bin/tybg.c index ea12c6e..8738047 100644 --- a/src/bin/tybg.c +++ b/src/bin/tybg.c @@ -10,15 +10,23 @@ main(int argc, char **argv) int i, perm = 0; if (!getenv("TERMINOLOGY")) return 0; - if (argc <= 1) + if (argc > 1 && + (!strcmp(argv[1], "-h") || !strcmp(argv[1], "--help"))) { - printf("Usage: %s [-p] FILE1 [FILE2 ...]\n" + 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]; + snprintf(tbuf, sizeof(tbuf), "%c}bt", 0x1b); + if (write(0, tbuf, strlen(tbuf) + 1) != (signed)(strlen(tbuf) + 1)) perror("write"); + return 0; + } for (i = 1; i < argc; i++) { char *path, buf[PATH_MAX * 2], tbuf[PATH_MAX * 3]; --