someblocks

default description
git clone https://git.awy.one/someblocks.git
Log | Files | Refs | README | LICENSE

commit d072368de029458b9410591bdd257471389a26f9
parent ed1e85d804242dca7feec6ef493d60051822498b
Author: Leonardo Hernández Hernández <leohdz172@protonmail.com>
Date:   Mon, 18 Apr 2022 09:38:07 -0500

allow user to set path of the fifo

Diffstat:
Msomeblocks.c | 10++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/someblocks.c b/someblocks.c @@ -193,9 +193,15 @@ int main(int argc, char** argv) strncpy(delim, argv[++i], delimLen); else if (!strcmp("-p",argv[i])) writestatus = pstdout; + else if (!strcmp("-s",argv[i])) + strcpy(somebarPath, argv[++i]); } - strcpy(somebarPath, getenv("XDG_RUNTIME_DIR")); - strcat(somebarPath, "/somebar-0"); + + if (!strlen(somebarPath)) { + strcpy(somebarPath, getenv("XDG_RUNTIME_DIR")); + strcat(somebarPath, "/somebar-0"); + } + delimLen = MIN(delimLen, strlen(delim)); delim[delimLen++] = '\0'; signal(SIGTERM, termhandler);