-- https://wiki.hypr.land/Configuring/Basics/Autostart/
hl.on("hyprland.start", function()
    -- monitorhandler (was exec-once in monitors.conf)
    hl.exec_cmd("~/Dotfiles/desktopenvs/hyprlua/scripts/monitorhandler.sh")

    hl.exec_cmd("export QT_QPA_PLATFORMTHEME='' && vicinae server")
    hl.exec_cmd("bash ~/Dotfiles/desktopenvs/hyprlua/scripts/bluetooth-applet.sh")
    hl.exec_cmd("bash ~/Dotfiles/desktopenvs/hyprlua/scripts/ulwatchdog.sh")
    hl.exec_cmd("bash ~/Dotfiles/desktopenvs/hyprlua/scripts/ewwstart.sh")
    hl.exec_cmd("udiskie -t -m nested -n")
    hl.exec_cmd("~/.config/scripts/unified-rotate.sh cw && sleep 0.3 && ~/.config/scripts/unified-rotate.sh ccw")
    hl.exec_cmd("systemctl --user start hyprpolkitagent")
    hl.exec_cmd("hyprsunset")
    hl.exec_cmd("nm-applet")
    hl.exec_cmd("dunst")
    hl.exec_cmd("[workspace special:magic silent] kitty")
    hl.exec_cmd("hyprctl setcursor Nordzy-cursors-lefthand 50")
    hl.exec_cmd("hyprpaper")
    hl.exec_cmd("bash ~/Dotfiles/desktopenvs/hyprlua/scripts/astal-menu-start.sh")
    hl.exec_cmd("blueman-applet")
    hl.exec_cmd("blueman-tray")
    hl.exec_cmd("hypridle")
    hl.exec_cmd("bash ~/Dotfiles/desktopenvs/hyprlua/scripts/presence-detect.sh")
    hl.exec_cmd("chamel")
    hl.exec_cmd("ydotoold")
    hl.exec_cmd("opendeck")

    -- Reload once everything has spawned so layer-shell clients (bar, astal-menu)
    -- pick up the final monitor/config state.
    hl.exec_cmd("sleep 1 && hyprctl reload")
end)
