diff --git a/i3pystatus/alsa.py b/i3pystatus/alsa.py index e147106..9da543b 100644 --- a/i3pystatus/alsa.py +++ b/i3pystatus/alsa.py @@ -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)) diff --git a/i3pystatus/clock.py b/i3pystatus/clock.py index dde491a..db63893 100644 --- a/i3pystatus/clock.py +++ b/i3pystatus/clock.py @@ -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,