dotfiles/.config/i3pystatus/redshift.py

13 lines
245 B
Python
Raw Normal View History

2020-08-23 14:32:31 +00:00
#!/usr/bin/python
from subprocess import call
state = call(['systemctl', '--user', 'is-active', '--quiet', 'redshift.service'])
if state == 0:
color = '#00FF00'
else:
color = '#FF0000'
print(f'<span color="{color}">Redshift</span>')