-- config/autostart.lua -- Replaces exec-once lines. In Lua config use hl.exec_once(). local function once(cmd) hl.exec_cmd(cmd) end hl.on("hyprland.start", function() hl.exec_cmd("systemctl --user start hyprland-session.target") -- ── Bar (QuickShell, replaces waybar) ──────────────────────── hl.exec_cmd("quickshell -c own") hl.exec_cmd("awww-daemon") -- ── System tray / applets ──────────────────────────────────── hl.exec_cmd("blueman-applet") once("fcitx5 -d") once("mako") once("nm-applet --indicator") once("/usr/lib/polkit-kde-authentication-agent-1") -- ── Wallpaper ───────────────────────────────────────────────── once("waypaper --restore") -- ── DBus / env plumbing ─────────────────────────────────────── once("systemctl --user import-environment") once("dbus-update-activation-environment --systemd") -- ── Idle daemon ─────────────────────────────────────────────── once(idlehandler) -- ── Other tools ─────────────────────────────────────────────── once("vicinae server") once("/usr/bin/pypr --debug /tmp/pypr.log") end) hl.on("config.reloaded", function() hl.exec_cmd("killall quickshell ") hl.exec_cmd("sleep 0.2; quickshell -c own") end) hl.on("hyprland.shutdown", function() os.execute("systemctl --user stop hyprland-session.target && sleep 0.1") -- uses a blocking exec function and sleeps a bit to give things time to close -- you might also want to kill troublesome/crashing non-systemd background services here: -- os.execute("pkill wallpaperthing; systemctl --user stop hyprland-session.target && sleep 0.1") end)