From 4b43dedb78c7a0b956015c833e96460ffe1fd18c Mon Sep 17 00:00:00 2001 From: Andrew Date: Sun, 7 Jun 2020 17:43:45 +0400 Subject: added host-specific configuration --- .local/bin/statusbar/volume | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to '.local/bin/statusbar/volume') diff --git a/.local/bin/statusbar/volume b/.local/bin/statusbar/volume index 673e591..ade5b98 100755 --- a/.local/bin/statusbar/volume +++ b/.local/bin/statusbar/volume @@ -67,11 +67,12 @@ percent = re.compile("(\d+)%") vol = None mute = False for sink in sinks.values(): - if 'JBL' in sink['Description']: + if 'JBL' in sink['Description']: # Headphones vol = int(percent.findall(sink['Volume'][0])[0]) mute = sink["Mute"] == "yes" break - elif 'Built-in' in sink['Description'] and vol is None: + # desktop and laptop sinks respectively + elif 'Built-in' in sink['Description'] or 'Family 17h' in sink['Description'] and vol is None: vol = int(percent.findall(sink['Volume'][0])[0]) mute = sink["Mute"] == "yes" @@ -79,6 +80,7 @@ for sink in sinks.values(): if vol is None or mute: print("🔇") + quit(0) if vol > 70: icon = "🔊" -- cgit v1.2.3