From 87c1377b08a9001a16943942e9d67458d8d19c33 Mon Sep 17 00:00:00 2001 From: Aaron Marcher Date: Tue, 13 Sep 2016 21:08:44 +0200 Subject: [PATCH] simplified vol_perc() (and with that config.def.h is super clean) --- config.def.h | 3 --- slstatus.c | 4 ++-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/config.def.h b/config.def.h index 8cf8e56..a445aa7 100644 --- a/config.def.h +++ b/config.def.h @@ -1,8 +1,5 @@ /* See LICENSE file for copyright and license details. */ -/* alsa sound */ -#define ALSA_CHANNEL "Master" - /* how often to update the statusbar (min value == 1) */ #define UPDATE_INTERVAL 1 diff --git a/slstatus.c b/slstatus.c index f61e987..1b45f64 100644 --- a/slstatus.c +++ b/slstatus.c @@ -459,7 +459,7 @@ uid(void) static char * -vol_perc(const char *snd_card) +vol_perc(const char *soundcard) { /* FIX THIS SHIT! */ long int vol, max, min; snd_mixer_t *handle; @@ -471,7 +471,7 @@ vol_perc(const char *snd_card) snd_mixer_selem_register(handle, NULL, NULL); snd_mixer_load(handle); snd_mixer_selem_id_malloc(&s_elem); - snd_mixer_selem_id_set_name(s_elem, ALSA_CHANNEL); + snd_mixer_selem_id_set_name(s_elem, "Master"); elem = snd_mixer_find_selem(handle, s_elem); if (elem == NULL) {