diff options
author | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2024-03-08 14:21:27 -0800 |
---|---|---|
committer | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2024-03-08 14:21:27 -0800 |
commit | 5dd09b56750552463af37e71aed18bb2e32c8900 (patch) | |
tree | 101a656538917290629f10bafe911b98cd40e47a /panel.py | |
parent | a01e01dc8281403bb37211d6f2f8c1071441e401 (diff) | |
download | panel-5dd09b56750552463af37e71aed18bb2e32c8900.tar.gz panel-5dd09b56750552463af37e71aed18bb2e32c8900.tar.xz |
make volume adjustment step configurable
Diffstat (limited to 'panel.py')
-rwxr-xr-x | panel.py | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -465,9 +465,10 @@ class ModMem(ModInterval): self.out = Fmt.labelled('MEM', f'{percent:.0f}%%') class ModPWVol(ModInterval): - def __init__(self, sink='@DEFAULT_AUDIO_SINK@', **kwargs): + def __init__(self, sink='@DEFAULT_AUDIO_SINK@', step='0.05', **kwargs): super().__init__(**kwargs) self.sink = sink + self.step = step def refresh(self): res = subprocess.run( @@ -482,9 +483,9 @@ class ModPWVol(ModInterval): buf = Fmt.bg('#a03000', ' error ') self.out = Fmt.clickable( - 4, f'{id(self)} set 0.05+', + 4, f'{id(self)} set {self.step}+', Fmt.clickable( - 5, f'{id(self)} set 0.05-', + 5, f'{id(self)} set {self.step}-', Fmt.clickable( '', f'{id(self)} toggle-mute', Fmt.labelled('VOL', buf)))) |