From f72b0fd5e63f3e0e01ad07de15e227cd84fc9330 Mon Sep 17 00:00:00 2001 From: rixx Date: Mon, 30 Mar 2015 15:26:46 +0200 Subject: configurable icons for player_control --- py3status/modules/player_control.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/py3status/modules/player_control.py b/py3status/modules/player_control.py index acae24a..3de3890 100644 --- a/py3status/modules/player_control.py +++ b/py3status/modules/player_control.py @@ -7,7 +7,7 @@ Provides an icon to control simple functions of audio/video players: - stop (left click) - pause (middle click) -@author Federico Ceratto +@author Federico Ceratto , rixx @license BSD """ # Any contributor to this module should add his/her name to the @author @@ -34,12 +34,15 @@ class Py3status: """ debug = False + pause_icon = u'❚❚' + play_icon = u'▶' + stop_icon = u'◼' supported_players = 'audacious vlc' volume_tick = 1 def __init__(self): self.status = 'stop' - self.icon = u'▶' + self.icon = self.play_icon def on_click(self, i3s_output_list, i3s_config, event): """ @@ -80,7 +83,7 @@ class Py3status: def _play(self): self.status = 'play' - self.icon = u'◼' + self.icon = self.stop_icon player_name = self._detect_running_player() if player_name == 'audacious': self._run(['/usr/bin/audacious', '-p']) @@ -91,7 +94,7 @@ class Py3status: def _stop(self): self.status = 'stop' - self.icon = u'▶' + self.icon = self.play_icon player_name = self._detect_running_player() if player_name == 'audacious': self._run(['/usr/bin/audacious', '-s']) @@ -102,7 +105,7 @@ class Py3status: def _pause(self): self.status = 'pause' - self.icon = u'❚❚' + self.icon = self.pause_icon player_name = self._detect_running_player() if player_name == 'audacious': self._run(['/usr/bin/audacious', '-u']) -- cgit v1.3