fixes to get_volume
This commit is contained in:
@@ -293,13 +293,21 @@ def get_volume():
|
|||||||
if result:
|
if result:
|
||||||
lines = result.splitlines()
|
lines = result.splitlines()
|
||||||
for line in lines:
|
for line in lines:
|
||||||
if "Front Left:" in line:
|
if line.strip().startswith("Mono:"):
|
||||||
try:
|
try:
|
||||||
vol = int(line.split()[4][1:-2])
|
vol = int(line.split()[3][1:-2])
|
||||||
|
switch = "on" in line.split()[4]
|
||||||
|
break
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
|
if line.strip().startswith("Front Left:"):
|
||||||
|
try:
|
||||||
|
vol = int(line.split()[4][1:-2])
|
||||||
|
switch = "on" in line.split()[5]
|
||||||
|
break
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
switch = "on" in line.split()[5]
|
|
||||||
break
|
|
||||||
|
|
||||||
return vol, switch
|
return vol, switch
|
||||||
|
|
||||||
|
2
setup.py
2
setup.py
@@ -8,7 +8,7 @@ def read(f_name):
|
|||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='nwg-panel',
|
name='nwg-panel',
|
||||||
version='0.1.2',
|
version='0.1.3',
|
||||||
description='GTK3-based panel for sway window manager',
|
description='GTK3-based panel for sway window manager',
|
||||||
packages=find_packages(),
|
packages=find_packages(),
|
||||||
include_package_data=True,
|
include_package_data=True,
|
||||||
|
Reference in New Issue
Block a user