Set night light to always on Link to heading

  1. Install dconf-editor:
sudo apt install dconf-editor
  1. Open dconf-editor and navigate to the key/org/gnome/settings-daemon/plugins/color/
  2. Set night-light-schedule-automatic to false
  3. Set night-light-schedule-from to 0, and night-light-schedule-to to 24 (or any value higher than this)

ref: link

Add custom shortcut to toggle night light Link to heading

Use the following script:

bash -c "if [[ $(gsettings get org.gnome.settings-daemon.plugins.color night-light-enabled) == "true" ]]; then gsettings set org.gnome.settings-daemon.plugins.color night-light-enabled false; else gsettings set org.gnome.settings-daemon.plugins.color night-light-enabled true; fi"

Bind it to a shortcut, mine is super + b

ref: link