diff options
author | Joe <bousset.rudy@gmail.com> | 2022-08-17 12:30:50 +0200 |
---|---|---|
committer | Joe <bousset.rudy@gmail.com> | 2022-08-17 12:30:50 +0200 |
commit | 3ed75db9452d4d29bc5f880a50871a7db7ae8955 (patch) | |
tree | a8231fb9dcab275930e1236d67e80d2712c71ec9 | |
parent | update (diff) | |
download | dwmblocks-3ed75db9452d4d29bc5f880a50871a7db7ae8955.tar.gz dwmblocks-3ed75db9452d4d29bc5f880a50871a7db7ae8955.tar.bz2 dwmblocks-3ed75db9452d4d29bc5f880a50871a7db7ae8955.tar.xz dwmblocks-3ed75db9452d4d29bc5f880a50871a7db7ae8955.tar.zst dwmblocks-3ed75db9452d4d29bc5f880a50871a7db7ae8955.zip |
cool
-rw-r--r-- | Makefile | 6 | ||||
-rw-r--r-- | config.h | 18 | ||||
-rw-r--r-- | dwmblocks.c | 10 |
3 files changed, 17 insertions, 17 deletions
@@ -1,12 +1,12 @@ .POSIX: PREFIX = /usr/local -CC = cc +CC = gcc dwmblocks: dwmblocks.o - $(CC) -march=tigerlake -O3 -pipe dwmblocks.o -L/usr/local/lib -lX11 -o dwmblocks + $(CC) -pipe dwmblocks.o -L/usr/local/lib -lX11 -o dwmblocks dwmblocks.o: dwmblocks.c config.h - $(CC) -std=c99 -Wall -Wextra -pedantic -I/usr/local/include -march=tigerlake -O3 -pipe -c dwmblocks.c + $(CC) -std=c99 -Wall -Wextra -pedantic -I/usr/local/include -pipe -c dwmblocks.c clean: rm -f *.o *.gch dwmblocks install: dwmblocks @@ -1,17 +1,17 @@ //Modify this file to change what commands output to your statusbar, and recompile using the make command. static const Block blocks[] = { /*Icon Command Update interval Update signal*/ - { "", "sb-mpd", 1, 11 }, - { "", "sb-mailbox", 30, 12 }, - { "", "sb-forecast", 3600, 11 }, - { "", "sb-cpu", 1, 12 }, - { "", "sb-memory", 5, 12 }, - { "", "sb-temp", 5, 12 }, + { "", "sb-mpd", 60, 10 }, + { "", "sb-mailbox", 60, 9 }, + { "", "sb-forecast", 3600, 8 }, + { "", "sb-cpu", 10, 7 }, + { "", "sb-memory", 20, 6 }, + { "", "sb-temp", 15, 5 }, /* { "", "sb-battery", 120, 3 }, */ - { "", "sb-volume", 1, 1 }, - { "", "sb-net", 1, 1 }, + { "", "sb-volume", 30, 3 }, + { "", "sb-net", 10, 2 }, { "", "sb-clock", 60, 1 }, - { "", "sb-os", 0, 1 }, + { "", "sb-os", 0, 0 }, /* { "", "sb-music", 0, 11 }, */ /* {"⌨", "sb-kbselect", 0, 30}, */ /* {"", "cat /tmp/recordingicon 2>/dev/null", 0, 9}, */ diff --git a/dwmblocks.c b/dwmblocks.c index 5d7f6cd..378c111 100644 --- a/dwmblocks.c +++ b/dwmblocks.c @@ -20,7 +20,7 @@ void buttonhandler(int sig, siginfo_t *si, void *ucontext); void replace(char *str, char old, char new); void remove_all(char *str, char to_remove); void getcmds(int time); -#ifndef BSD +#ifndef ___OpenBSD___ void getsigcmds(int signal); void setupsignals(); void sighandler(int signum); @@ -134,7 +134,7 @@ void getcmds(int time) } } -#ifndef BSD +#ifndef ___OpenBSD___ void getsigcmds(int signal) { const Block *current; @@ -227,7 +227,7 @@ void pstdout() void statusloop() { -#ifndef BSD +#ifndef ___OpenBSD___ setupsignals(); #endif // first figure out the default wait interval by finding the @@ -261,7 +261,7 @@ void statusloop() } } -#ifndef BSD +#ifndef ___OpenBSD___ void sighandler(int signum) { getsigcmds(signum-SIGRTMIN); @@ -283,7 +283,7 @@ void buttonhandler(int sig, siginfo_t *si, void *ucontext) break; } char shcmd[1024]; - sprintf(shcmd,"%s && kill -%d %d",current->command, current->signal+34,process_id); + sprintf(shcmd,"%s && kill -%d %d",current->command, current->signal+SIGRTMIN,process_id); char *command[] = { "/bin/sh", "-c", shcmd, NULL }; setenv("BLOCK_BUTTON", button, 1); setsid(); |