diff options
| author | J.M. Dana <jmdana@gmail.com> | 2015-04-01 21:11:46 +0100 |
|---|---|---|
| committer | J.M. Dana <jmdana@gmail.com> | 2015-04-01 21:11:46 +0100 |
| commit | 6b10daf968f0ed990a5c0a5c42ad73a97bc98d5b (patch) | |
| tree | fb7ac5e07dce884abb90e4f1adab25980de1c448 /py3status/modules/dpms.py | |
| parent | e53c74e4c3586638991769e864cb97e78945d583 (diff) | |
External processes might change DPMS so the module should check in the
main loop
Diffstat (limited to 'py3status/modules/dpms.py')
| -rw-r--r-- | py3status/modules/dpms.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/py3status/modules/dpms.py b/py3status/modules/dpms.py index c2d9c4e..cfc7213 100644 --- a/py3status/modules/dpms.py +++ b/py3status/modules/dpms.py @@ -25,9 +25,13 @@ class Py3status: """ 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: |
