From 3b82e8de1ec296b8c4f255c7a4d02870bea77809 Mon Sep 17 00:00:00 2001 From: Holden Salomon Date: Sat, 5 Dec 2015 13:37:32 -0500 Subject: [PATCH] Added previous song support, activated by scrolling down while over the module --- i3pystatus/spotify.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/i3pystatus/spotify.py b/i3pystatus/spotify.py index 4404fe8..a4d0987 100644 --- a/i3pystatus/spotify.py +++ b/i3pystatus/spotify.py @@ -39,6 +39,7 @@ class Spotify(IntervalModule): on_leftclick = 'playpause' on_rightclick = 'next_song' on_upscroll = 'next_song' + on_downscroll = 'previous_song' def get_info(self, player): """gets spotify track info from playerctl""" @@ -101,3 +102,7 @@ class Spotify(IntervalModule): def next_song(self): """skips to the next song""" self.player.next() + + def previous_song(self): + """Plays the previous song""" + self.player.previous()