diff --git a/docs/docs.md b/docs/docs.md index 429535b..c2ed2be 100644 --- a/docs/docs.md +++ b/docs/docs.md @@ -835,6 +835,9 @@ or enable it by passing -xrdb. You can also set this in the config file. You can also use wildcards (such as `*`) to achieve a global colorscheme. Programs like `pywal` do this to apply universal colorschemes. +`spmenu.color0` through `spmenu.color15` and `spmenu.font` preferences +are read by spmenu, these alter the font and colorscheme spmenu uses. + ## Themes You could just `@include` themes from the aforementioned `spmenu.conf`, but @@ -852,29 +855,18 @@ Do however note that the theme file is **not** the same as the config file. There are quite a lot of differences, and many options are not available. This is by design, as these options should be set by the user, not the theme. -Not very convenient if you have many themes because you constantly -have to replace your theme file, so theme managers exist to make this a -bit easier. [spmenuify](https://git.speedie.site/speedie/spmenuify) is the official -theme manager, but you could use another one or write your own. +Having a single theme file is not very convenient if you have many themes +because you constantly have to replace your theme file, so theme managers +exist to make this a bit easier. [spmenuify](https://git.speedie.site/speedie/spmenuify) +is the official theme manager, but you could use another one or write your own. For more information on the theme.conf configuration file, see [this page](https://spmenu.speedie.site/theme.conf+documentation). -## spmenu commands - -spmenu has a few special commands. These work similar to the images. For example -to list the version, in addition to the `--version` argument you can also simply -run `printf 'spmenu:version' | spmenu`. There are a few of these. - -`spmenu:version` -: Print the spmenu version - -`spmenu:license` -: Print the spmenu license - ## License -spmenu is licensed under the MIT license. +spmenu is licensed under the MIT license. The documentation is licensed +under the CC-BY-SA 4.0 license. ## Reporting issues @@ -888,3 +880,4 @@ or the [GitHub mirror](https://github.com/speediegq/spmenu). - [spmenu wiki](https://spmenu.speedie.site) - [spmenu git repository](https://git.speedie.site/speedie/spmenu) - [spmenu GitHub mirror](https://github.com/speediegq/spmenu) +- [spmenuify](https://git.speedie.site/speedie/spmenuify) diff --git a/libs/stream.c b/libs/stream.c index 084860b..b30085a 100644 --- a/libs/stream.c +++ b/libs/stream.c @@ -182,6 +182,12 @@ int parsemarkup(int index) { if(items[index].image) { limg = items[index].image; } + + if (limg) { + return 1; + } else { + return 0; + } #else // remove the data, just for convenience char *data; @@ -195,37 +201,4 @@ int parsemarkup(int index) { } } #endif - - /* TODO: use this for something - * current usage is not very uslful, however it's here to be used later. - */ - if(!(items[index].ex = malloc(strlen(items[index].text)+1))) - fprintf(stderr, "spmenu: cannot malloc %lu bytes\n", strlen(items[index].text)); - if (!strncmp("spmenu:", items[index].text, strlen("spmenu:"))) { - if (sscanf(items[index].text, "spmenu:%[^\t]", items[index].ex)) { - items[index].text += strlen("spmenu:")+strlen(items[index].ex)+1; - } - - // spmenu:version - if (!strncmp("version", items[index].ex, strlen("version"))) { - fprintf(stdout, "spmenu version %s\n", VERSION); - exit(0); - } - - // spmenu:license - if (!strncmp("license", items[index].ex, strlen("license"))) { - fprintf(stdout, "spmenu is licensed under the MIT license. See the included LICENSE file for more information.\n"); - exit(0); - } - } - -#if USEIMAGE - if (limg) { - return 1; - } else { - return 0; - } -#else - return 0; -#endif } diff --git a/spmenu.1 b/spmenu.1 index c766811..bc3349b 100644 --- a/spmenu.1 +++ b/spmenu.1 @@ -1386,6 +1386,10 @@ You can also set this in the config file. You can also use wildcards (such as \f[V]*\f[R]) to achieve a global colorscheme. Programs like \f[V]pywal\f[R] do this to apply universal colorschemes. +.PP +\f[V]spmenu.color0\f[R] through \f[V]spmenu.color15\f[R] and +\f[V]spmenu.font\f[R] preferences are read by spmenu, these alter the +font and colorscheme spmenu uses. .SS Themes .PP You could just \f[V]\[at]include\f[R] themes from the aforementioned @@ -1409,31 +1413,18 @@ available. This is by design, as these options should be set by the user, not the theme. .PP -Not very convenient if you have many themes because you constantly have -to replace your theme file, so theme managers exist to make this a bit -easier. +Having a single theme file is not very convenient if you have many +themes because you constantly have to replace your theme file, so theme +managers exist to make this a bit easier. spmenuify (https://git.speedie.site/speedie/spmenuify) is the official theme manager, but you could use another one or write your own. .PP For more information on the theme.conf configuration file, see this page (https://spmenu.speedie.site/theme.conf+documentation). -.SS spmenu commands -.PP -spmenu has a few special commands. -These work similar to the images. -For example to list the version, in addition to the \f[V]--version\f[R] -argument you can also simply run -\f[V]printf \[aq]spmenu:version\[aq] | spmenu\f[R]. -There are a few of these. -.TP -\f[V]spmenu:version\f[R] -Print the spmenu version -.TP -\f[V]spmenu:license\f[R] -Print the spmenu license .SS License .PP spmenu is licensed under the MIT license. +The documentation is licensed under the CC-BY-SA 4.0 license. .SS Reporting issues .PP Please report issues on the Git @@ -1450,3 +1441,5 @@ spmenu wiki (https://spmenu.speedie.site) spmenu git repository (https://git.speedie.site/speedie/spmenu) .IP \[bu] 2 spmenu GitHub mirror (https://github.com/speediegq/spmenu) +.IP \[bu] 2 +spmenuify (https://git.speedie.site/speedie/spmenuify)