From: Aaron Marcher Date: Mon, 9 Jan 2017 11:05:29 +0000 (+0100) Subject: Makefile fix and vol_perc fix for mute X-Git-Url: https://git.atheridis.org/?a=commitdiff_plain;h=3f976aabc08dd7d4762b0e04f0cbe8550f0e3ced;p=suckless%2Fslstatus.git Makefile fix and vol_perc fix for mute --- diff --git a/Makefile b/Makefile index 43d8cef..9e1d0d5 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ include config.mk all: slstatus -slstatus: config.h config.mk +slstatus: slstatus.c config.h config.mk ${CC} ${CFLAGS} -o $@ slstatus.c ${LDFLAGS} config.h: diff --git a/slstatus.c b/slstatus.c index 6d2e89e..89186d6 100644 --- a/slstatus.c +++ b/slstatus.c @@ -658,9 +658,7 @@ vol_perc(const char *card) } close(afd); - if (v == 0) { - return smprintf("mute"); - } + return smprintf("%d%%", v & 0xff); }