Merge pull request #117 from teto/fix_alsa_and_clock
this commit fixes 2 problems:
This commit is contained in:
commit
fc015e8908
@ -92,8 +92,8 @@ class ALSA(IntervalModule):
|
|||||||
|
|
||||||
def on_upscroll(self):
|
def on_upscroll(self):
|
||||||
vol = self.alsamixer.getvolume()[self.channel]
|
vol = self.alsamixer.getvolume()[self.channel]
|
||||||
self.alsamixer.setvolume( vol + self.increment)
|
self.alsamixer.setvolume(min(100, vol + self.increment))
|
||||||
|
|
||||||
def on_downscroll(self):
|
def on_downscroll(self):
|
||||||
vol = self.alsamixer.getvolume()[self.channel]
|
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:
|
else:
|
||||||
dt = datetime.datetime.now()
|
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 = {
|
self.output = {
|
||||||
"full_text": output,
|
"full_text": output,
|
||||||
|
Loading…
Reference in New Issue
Block a user