diff options
| author | Blista Kanjo | 2024-06-26 13:31:02 -0400 |
|---|---|---|
| committer | Blista Kanjo | 2024-06-26 13:31:02 -0400 |
| commit | a679bffb6805dbe2ed30a5a0467a2ea8cfb96750 (patch) | |
| tree | 9691ad03026b87f21fb94a5085a563581867ac38 /.local | |
| parent | c386ed98d4f25bebd04ba5d46209183bd991b630 (diff) | |
feat: re-arrange buttons for `playerctl_systray`
Diffstat (limited to '.local')
| -rwxr-xr-x | .local/share/python-playerctl_systray/playerctl_systray_Xaymup.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/.local/share/python-playerctl_systray/playerctl_systray_Xaymup.py b/.local/share/python-playerctl_systray/playerctl_systray_Xaymup.py index 7633464..5b2b0a3 100755 --- a/.local/share/python-playerctl_systray/playerctl_systray_Xaymup.py +++ b/.local/share/python-playerctl_systray/playerctl_systray_Xaymup.py @@ -1,6 +1,6 @@ #!/usr/bin/python # author: Mohamed Alaa <m-alaa8@ubuntu.com> -# added a quit button: kj_sh604 +# added a quit button, and re-arranged buttons: kj_sh604 import gc import io import threading @@ -39,22 +39,22 @@ class MediaControlIndicator(Gtk.Application): self.play_button = Gtk.ImageMenuItem( label='Play', image=Gtk.Image(stock=Gtk.STOCK_MEDIA_PLAY)) - self.previous_button = Gtk.ImageMenuItem( - label='Previous', - image=Gtk.Image(stock=Gtk.STOCK_MEDIA_PREVIOUS), - ) self.next_button = Gtk.ImageMenuItem( label='Next', image=Gtk.Image(stock=Gtk.STOCK_MEDIA_NEXT), ) + self.previous_button = Gtk.ImageMenuItem( + label='Previous', + image=Gtk.Image(stock=Gtk.STOCK_MEDIA_PREVIOUS), + ) self.quit_button = Gtk.ImageMenuItem( label='Quit', image=Gtk.Image(stock=Gtk.STOCK_QUIT), # add icon for quit button ) self.play_button.connect('activate', self.media_play) - self.previous_button.connect('activate', self.media_previous) self.next_button.connect('activate', self.media_next) + self.previous_button.connect('activate', self.media_previous) self.quit_button.connect('activate', self.quit) # connect quit button # toggle play / pause on middle click @@ -68,8 +68,8 @@ class MediaControlIndicator(Gtk.Application): self.menu.append(self.albumart_item) self.menu.append(self.np_item) self.menu.append(self.play_button) + self.menu.append(self.next_button) # next button before previous button self.menu.append(self.previous_button) - self.menu.append(self.next_button) self.menu.append(self.quit_button) # add quit button to menu GLib.timeout_add_seconds(1, self.set_np) |
