diff options
| author | Jan T <keppinakki@gmail.com> | 2015-06-10 02:17:19 +0300 |
|---|---|---|
| committer | Jan T <keppinakki@gmail.com> | 2015-06-10 02:17:19 +0300 |
| commit | e4273aa83bd537d1f159f1f0bc68308434e956c4 (patch) | |
| tree | 405f152df9386d964d635a72880e666b84cddbd1 | |
| parent | da8ca234a74e9ba0dbfa7aea2175d7883dc2b529 (diff) | |
Changed standard formats.
| -rw-r--r-- | py3status/modules/volume_status.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/py3status/modules/volume_status.py b/py3status/modules/volume_status.py index a395108..b436b5c 100644 --- a/py3status/modules/volume_status.py +++ b/py3status/modules/volume_status.py @@ -1,6 +1,6 @@ """ Show current volume from amixer. -Reads the current Master volume from amixer. +Extend on the standard i3status volume module by adding color and threshold settings. Configuration parameters: - format : format the output, available variables: {percentage} - format_mute : format the output when the volume is muted @@ -21,8 +21,8 @@ from subprocess import check_output class Py3status: - format = "{percentage}%" - format_mute = "mute" + format = "♪: {percentage}%" + format_muted = "♪: muted" cache_timeout = 0 threshold_degraded = 50 @@ -74,7 +74,7 @@ class Py3status: # call amixer output = check_output(["amixer", "sget", self.channel]).decode() - + # get the current percentage value perc = self._get_percentage(output) @@ -85,7 +85,7 @@ class Py3status: color = self._perc_to_color(perc) # format the output - text = self._format_output(self.format_mute if muted else self.format, perc) + text = self._format_output(self.format_muted if muted else self.format, perc) # if the text has been changed, update the cached text and # set transformed to True |
