diff options
| -rwxr-xr-x | py3status/__init__.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/py3status/__init__.py b/py3status/__init__.py index 7a110a9..1dd0001 100755 --- a/py3status/__init__.py +++ b/py3status/__init__.py @@ -580,6 +580,22 @@ class Events(Thread): ): instance = k.split(' ', 1)[1] break + + # volume default.Master.0 + elif name == 'volume': + device, mixer, mixer_idx = instance.split('.') + for k, v in self.i3s_config.items(): + if ( + k.startswith('volume') + and isinstance(v, dict) + and v.get('device') == device + and v.get('mixer') == mixer + and str(v.get('mixer_idx')) == mixer_idx + ): + instance = k.split(' ', 1)[1] + break + else: + instance = 'master' except: pass finally: |
