Merge pull request #117 from teto/fix_alsa_and_clock
this commit fixes 2 problems:
This commit is contained in:
commit
fc015e8908
@ -25,7 +25,7 @@ class ALSA(IntervalModule):
|
||||
("mixer", "ALSA mixer"),
|
||||
("mixer_id", "ALSA mixer id"),
|
||||
("card", "ALSA sound card"),
|
||||
("increment","integer percentage of max volume to in/decrement volume on mousewheel"),
|
||||
("increment", "integer percentage of max volume to in/decrement volume on mousewheel"),
|
||||
"muted", "unmuted",
|
||||
"color_muted", "color",
|
||||
"channel"
|
||||
@ -87,13 +87,13 @@ class ALSA(IntervalModule):
|
||||
|
||||
def on_rightclick(self):
|
||||
if self.has_mute:
|
||||
muted = self.alsamixer.getmute()[self.channel]
|
||||
self.alsamixer.setmute( not muted )
|
||||
muted = self.alsamixer.getmute()[self.channel]
|
||||
self.alsamixer.setmute(not muted)
|
||||
|
||||
def on_upscroll(self):
|
||||
vol = self.alsamixer.getvolume()[self.channel]
|
||||
self.alsamixer.setvolume( vol + self.increment)
|
||||
self.alsamixer.setvolume(min(100, vol + self.increment))
|
||||
|
||||
def on_downscroll(self):
|
||||
vol = self.alsamixer.getvolume()[self.channel]
|
||||
self.alsamixer.setvolume( vol - self.increment)
|
||||
self.alsamixer.setvolume(max(0, vol - self.increment))
|
||||
|
@ -59,7 +59,7 @@ class Clock(IntervalModule):
|
||||
else:
|
||||
dt = datetime.datetime.now()
|
||||
|
||||
output = dt.strftime(self.format[self.current_format_id][0]),
|
||||
output = dt.strftime(self.format[self.current_format_id][0])
|
||||
|
||||
self.output = {
|
||||
"full_text": output,
|
||||
|
Loading…
Reference in New Issue
Block a user