diff options
| author | Ultrabug <ultrabug@ultrabug.net> | 2015-04-03 16:25:47 +0200 |
|---|---|---|
| committer | Ultrabug <ultrabug@ultrabug.net> | 2015-04-03 16:25:47 +0200 |
| commit | 9c85973bfa9370baa95f6e280431319dcf1f0a01 (patch) | |
| tree | ea5fd0caf3e25c3138bc80800aed525ad9b308bb /py3status/modules | |
| parent | a199d9624b56a508e362eadfc642dbbf07606412 (diff) | |
| parent | dc96298a963d821b00261af76e5bc493c31a0fab (diff) | |
Merge pull request #91 from jmdana/dpms
dpms module : check status at configured interval to catch any external's processes DPMS change by @jmdana
Diffstat (limited to 'py3status/modules')
| -rw-r--r-- | py3status/modules/dpms.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/py3status/modules/dpms.py b/py3status/modules/dpms.py index c2d9c4e..d1967f7 100644 --- a/py3status/modules/dpms.py +++ b/py3status/modules/dpms.py @@ -15,19 +15,17 @@ from os import system class Py3status: """ """ - def __init__(self): - """ - Detect current state on start. - """ - self.run = system('xset -q | grep -iq "DPMS is enabled"') == 0 - def dpms(self, i3s_output_list, i3s_config): """ Display a colorful state of DPMS. """ + + self.run = system('xset -q | grep -iq "DPMS is enabled"') == 0 + response = { 'full_text': 'DPMS' } + if self.run: response['color'] = i3s_config['color_good'] else: |
