From 60bfb19378cf6885f5b16a14a6af3a535404ea40 Mon Sep 17 00:00:00 2001 From: Ludwig Behm Date: Fri, 10 Nov 2023 20:44:16 +0100 Subject: [PATCH] pulseout: adding nerd font icons for low, mid, heigh, muted --- bumblebee_status/modules/core/pulsectl.py | 6 +++++- themes/icons/awesome-fonts.json | 7 +++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/bumblebee_status/modules/core/pulsectl.py b/bumblebee_status/modules/core/pulsectl.py index fd77c26..63f9e36 100644 --- a/bumblebee_status/modules/core/pulsectl.py +++ b/bumblebee_status/modules/core/pulsectl.py @@ -198,6 +198,10 @@ class Module(core.module.Module): def state(self, _): if self.__muted: return ["warning", "muted"] - return ["unmuted"] + if self.__volume >= .5: + return ["unmuted", "unmuted-high"] + if self.__volume >= .1: + return ["unmuted", "unmuted-mid"] + return ["unmuted", "unmuted-low"] # vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4 diff --git a/themes/icons/awesome-fonts.json b/themes/icons/awesome-fonts.json index d01f66f..dae3d92 100644 --- a/themes/icons/awesome-fonts.json +++ b/themes/icons/awesome-fonts.json @@ -199,11 +199,14 @@ }, "pulseout": { "muted": { - "prefix": "" + "prefix": "󰝟" }, "unmuted": { "prefix": "" - } + }, + "unmuted-low": { "prefix": "󰕿" }, + "unmuted-mid": { "prefix": "󰖀" }, + "unmuted-high": { "prefix": "󰕾" } }, "amixer": { "muted": {