back to i3, update config

This commit is contained in:
Franzi 2020-08-23 16:32:31 +02:00
parent 26267a1fcd
commit ad76000844
Signed by untrusted user: kunsi
GPG key ID: 12E3D2136B818350
3 changed files with 17 additions and 3 deletions

View file

@ -75,6 +75,8 @@ status.register("shell",
format="{output}",
hints = {"markup": "pango"},
command="/home/kunsi/.config/i3pystatus/redshift.py",
on_leftclick='systemctl --user start redshift.service',
on_rightclick='systemctl --user stop redshift.service',
interval=1)
status.register("shell",
format="{output}",
@ -91,6 +93,7 @@ status.register("network",
detect_active=True,
freq_divisor=1000000000,
divisor=1024,
on_leftclick="gnome-terminal -- nmtui",
hints={"markup":"pango"})
#status.register("mpd",

12
.config/i3pystatus/redshift.py Executable file
View file

@ -0,0 +1,12 @@
#!/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>')