25 lines
716 B
Shell
Executable file
25 lines
716 B
Shell
Executable file
#!/bin/sh
|
|
|
|
# Ensure "Night Light" is enabled,
|
|
# set to run according to the automatic schedule,
|
|
# and reverted to the `_DEFAULT_TEMPERATURE`
|
|
#
|
|
# Intended to be run at 03:00 by the `night-light-reset.timer` systemd
|
|
# user unit, so that a forced state does not persist
|
|
#
|
|
# See ~/.local/bin/night-light-toggle-schedule for detailed documentation
|
|
|
|
set -eu
|
|
|
|
|
|
_DEFAULT_TEMPERATURE=2200
|
|
|
|
|
|
Schema=org.gnome.settings-daemon.plugins.color
|
|
|
|
gsettings set $Schema night-light-enabled true
|
|
gsettings set $Schema night-light-schedule-automatic true
|
|
gsettings set $Schema night-light-schedule-from 18.0
|
|
gsettings set $Schema night-light-schedule-to 6.0
|
|
|
|
gsettings set $Schema night-light-temperature "uint32 $_DEFAULT_TEMPERATURE"
|