From 3ed75db9452d4d29bc5f880a50871a7db7ae8955 Mon Sep 17 00:00:00 2001 From: Joe Date: Wed, 17 Aug 2022 12:30:50 +0200 Subject: cool --- Makefile | 6 +++--- config.h | 18 +++++++++--------- dwmblocks.c | 10 +++++----- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Makefile b/Makefile index ee97fcf..db4aa81 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/config.h b/config.h index 99208c9..2b823b0 100644 --- a/config.h +++ b/config.h @@ -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(); -- cgit v1.2.3