-- Exercise startup selection without executing commands or changing the session. local profile, notification_profile = arg[1], arg[2] local original_getenv = os.getenv os.getenv = function(name) if name == "ADAPTIVE_SHELL" then return profile end if name == "ADAPTIVE_NOTIFICATIONS" then return notification_profile end return original_getenv(name) end local commands = {} hl = { on = function(event, callback) assert(event == "hyprland.start"); callback() end, exec_cmd = function(command) commands[command] = true end, } dofile("hypr/startup.lua") dofile("hypr/programs.lua") assert(commands["hypridle"] and commands["lxpolkit"] and commands["clipse -listen"]) assert(commands["waybar"] == (profile ~= "1" and true or nil)) assert(commands["~/dotfiles/hypr/bin/adaptive-shell start"] == (profile == "1" and true or nil)) assert(commands["swaync"] == ((profile ~= "1" or notification_profile ~= "1") and true or nil)) assert((launcher:find("adaptive-shell", 1, true) ~= nil) == (profile == "1")) print("PASS startup and command routing", profile, notification_profile)