MyNixOS website logo

Scripts to run when switching modes, placed in $XDG_DATA_HOME/darkman/. Each script receives the new mode (dark or light) as its first argument, allowing a single script to handle both modes.

Multiline strings are interpreted as Bash shell scripts and a shebang is not required.

These scripts take precedence over legacy scripts of the same name in darkModeScripts and lightModeScripts.

Declarations
Type
attribute set of (absolute path or strings concatenated with "\n")
Default
{ }
Example
{
  gtk-theme = ''
    if [ "$1" = "dark" ]; then
      ${pkgs.dconf}/bin/dconf write \
          /org/gnome/desktop/interface/color-scheme "'prefer-dark'"
    else
      ${pkgs.dconf}/bin/dconf write \
          /org/gnome/desktop/interface/color-scheme "'prefer-light'"
    fi
  '';
}