aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/alsa.py
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2017-03-08 22:10:21 +0100
committerMattias Andrée <maandree@kth.se>2017-03-08 22:10:21 +0100
commitc302db32c2bad1458d1827bacaef6f399d2c6a60 (patch)
tree219a2a2908aa8f8891c99277b8a9128d264847f5 /src/plugins/alsa.py
parentalsa: use default card by default and add support for lookup by cardname (diff)
downloadxpybar-c302db32c2bad1458d1827bacaef6f399d2c6a60.tar.gz
xpybar-c302db32c2bad1458d1827bacaef6f399d2c6a60.tar.bz2
xpybar-c302db32c2bad1458d1827bacaef6f399d2c6a60.tar.xz
m + add lid and powersupply
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'src/plugins/alsa.py')
-rw-r--r--src/plugins/alsa.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/plugins/alsa.py b/src/plugins/alsa.py
index 68d47bf..f624672 100644
--- a/src/plugins/alsa.py
+++ b/src/plugins/alsa.py
@@ -44,7 +44,7 @@ class ALSA:
'''
- def __init__(self, card = -1, mixername = 'Master', *, **kwargs):
+ def __init__(self, card = -1, mixername = 'Master', *, cardindex = None):
'''
Constructor
@@ -52,8 +52,8 @@ class ALSA:
`ALSA.DEFAULT_CARD` (-1) or 'default' for the default card
@param mixername:str The name of the mixer
'''
- if card == -1 and 'cardindex' in kwargs: # For backwards compatibility
- card = kwargs['cardindex']
+ if card == -1 and cardindex is not None: # For backwards compatibility
+ card = cardindex
if isinstance(card, str):
if card == 'default':
card = -1
@@ -131,7 +131,7 @@ class ALSA:
@staticmethod
- def get_mixers(card = -1, *, **kwargs):
+ def get_mixers(card = -1, *, cardindex = None):
'''
Get the names of all available mixers for an audio card
@@ -139,8 +139,8 @@ class ALSA:
`ALSA.DEFAULT_CARD` (-1) or 'default' for the default card
@return :list<str> The names of all available mixers for an audio card
'''
- if card == -1 and 'cardindex' in kwargs: # For backwards compatibility
- card = kwargs['cardindex']
+ if card == -1 and cardindex is not None: # For backwards compatibility
+ card = cardindex
if isinstance(card, str):
if card == 'default':
card = -1