forked from kunsi/dotfiles
back to i3, update config
This commit is contained in:
parent
26267a1fcd
commit
ad76000844
3 changed files with 17 additions and 3 deletions
|
@ -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
12
.config/i3pystatus/redshift.py
Executable 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>')
|
Loading…
Add table
Add a link
Reference in a new issue