Update screen temperature script
parent
9ab374f38e
commit
fcb1469297
|
@ -43,6 +43,9 @@ try:
|
|||
subprocess.run(["redshift", "-O", str(new_temperature), "-P"], check=True)
|
||||
with open('/tmp/temperature', 'w') as temp_file:
|
||||
temp_file.write(str(new_temperature) + '\n')
|
||||
# Send notification
|
||||
subprocess.run(
|
||||
["notify-send", str(new_temperature) + "K"])
|
||||
except subprocess.CalledProcessError:
|
||||
print("Error: could not set screen temperature.")
|
||||
sys.exit(1)
|
||||
|
|
|
@ -256,8 +256,8 @@ pause = spawn "playerctl pause"
|
|||
brighten, dim, warm, cool, resetTemp :: X ()
|
||||
brighten = spawn "brightnessctl set 20+"
|
||||
dim = spawn "brightnessctl set 20-"
|
||||
warm = spawn "screen-temperature +50 && notify < /tmp/temperature -h string:x-canonical-private-synchronous:anything"
|
||||
cool = spawn "screen-temperature -50 && notify < /tmp/temperature -h string:x-canonical-private-synchronous:anything"
|
||||
warm = spawn "screen-temperature +50"
|
||||
cool = spawn "screen-temperature -50"
|
||||
resetTemp = spawn "screen-temperature 3000"
|
||||
|
||||
-- }}}
|
||||
|
|
Loading…
Reference in New Issue