{ pkgs, ... }:
{
  config.home.niri.settings.autostart = pkgs.writeText "autostart" ''
    spawn-at-startup "waybar"
    
    // Daemons and tray
    spawn-at-startup "wpaperd"
    spawn-at-startup "wl-paste" "-t" "text" "--watch" "clipman" "store" "-P"
    spawn-at-startup "wl-copy"
    spawn-at-startup "mako"
    spawn-at-startup "rot8"
    spawn-at-startup "wlsunset" "-s" "23:00" "-S" "06:30"
    spawn-at-startup "${pkgs.mate.mate-polkit}/libexec/polkit-mate-authentication-agent-1"
    spawn-at-startup "${pkgs.xwayland-satellite}/bin/xwayland-satellite"
    
    // Foreground
    spawn-at-startup "thunderbird"
    spawn-at-startup "vesktop"
  '';
}
