kunsis-dotfiles/.config/i3pystatus/redshift.py
2020-08-23 16:32:31 +02:00

13 lines
245 B
Python
Executable file

#!/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>')