diff --git a/hammerspoon/.hammerspoon/Makefile b/hammerspoon/.hammerspoon/Makefile index 16a373d8..b56cba3d 100644 --- a/hammerspoon/.hammerspoon/Makefile +++ b/hammerspoon/.hammerspoon/Makefile @@ -17,9 +17,9 @@ $(NATIVE_BINARIES) native/.build/test-glass-geometry: native/GlassBackground.swi xcrun swiftc $(SWIFT_FLAGS) -target "$$(uname -m)-apple-macosx13.0" -framework AppKit $^ -o $@.tmp mv -f $@.tmp $@ -# Visual preview only; does not change caffeine state. +# Visual preview only. preview-glass: native - native/.build/glass-toast enabled "Caffeine Enabled" 4 + native/.build/glass-toast compact-bottom "Muted" speaker.slash 4 test-glass-geometry: native/.build/test-glass-geometry native/.build/test-glass-geometry diff --git a/hammerspoon/.hammerspoon/init.lua b/hammerspoon/.hammerspoon/init.lua index 28a262e3..6ad00168 100644 --- a/hammerspoon/.hammerspoon/init.lua +++ b/hammerspoon/.hammerspoon/init.lua @@ -14,10 +14,10 @@ hs.alert.defaultStyle.fadeOutDuration = 2 require("modules.plugins") -- require("modules.alerts") -require("modules.caffeine") +local hud_position = "top" -- "top" or "bottom" for caffeine and reload feedback +local island_hud = require("modules.island_hud") +require("modules.caffeine").bind(HYPER, "0", { position = hud_position }) -local glass_toast = require("modules.glass_toast") -local helpers = require("modules.helpers") local mouse_grid = require("modules.mouse_grid") local wm = require("modules.wm") @@ -78,6 +78,7 @@ mouse_grid.bind(HYPER, "g") -- Clean up overlays without replacing window-state persistence on reload. local save_window_state = hs.shutdownCallback hs.shutdownCallback = function() + island_hud.dismiss() mouse_grid.shutdown() require("modules.chooser").shutdown() if save_window_state then @@ -98,6 +99,4 @@ end) -- The CLI itself is installed separately, so do not recheck/reinstall it on reload. require("hs.ipc") -glass_toast:show("reload", "Hammerspoon Reloaded", function() - helpers:show("Hammerspoon Reloaded") -end) +island_hud.show("Hammerspoon Reloaded", hud_position) diff --git a/hammerspoon/.hammerspoon/modules/caffeine.lua b/hammerspoon/.hammerspoon/modules/caffeine.lua index b7fcff5a..1c250b66 100644 --- a/hammerspoon/.hammerspoon/modules/caffeine.lua +++ b/hammerspoon/.hammerspoon/modules/caffeine.lua @@ -1,12 +1,17 @@ -local glass_toast = require("modules.glass_toast") -local helpers = require("modules.helpers") +local island_hud = require("modules.island_hud") +local obj = {} -hs.hotkey.bind(HYPER, "0", function() - hs.caffeinate.toggle("displayIdle") - local enabled = hs.caffeinate.get("displayIdle") - local title = enabled and "Caffeine Enabled" or "Caffeine Disabled" - local style = enabled and helpers.styles.success or helpers.styles.error - glass_toast:show(enabled and "enabled" or "disabled", title, function() - helpers:show(title, nil, style) +function obj.bind(modifiers, key, options) + local position = (options or {}).position or "bottom" + assert( + position == "top" or position == "bottom", + 'Caffeine HUD position must be "top" or "bottom"' + ) + return hs.hotkey.bind(modifiers, key, function() + hs.caffeinate.toggle("displayIdle") + local enabled = hs.caffeinate.get("displayIdle") + island_hud.show(enabled and "Caffeine Enabled" or "Caffeine Disabled", position) end) -end) +end + +return obj diff --git a/hammerspoon/.hammerspoon/modules/glass_toast.lua b/hammerspoon/.hammerspoon/modules/glass_toast.lua index 24b49782..930e53e3 100644 --- a/hammerspoon/.hammerspoon/modules/glass_toast.lua +++ b/hammerspoon/.hammerspoon/modules/glass_toast.lua @@ -3,8 +3,9 @@ local task local log = hs.logger.new("glass_toast", "warning") -- Build explicitly with `make native`; never compile on the hotkey path. --- kind: "enabled", "disabled", or "reload". -function obj:show(kind, title, fallback) +-- options: layout ("compact-bottom" or "centered-card"), title, and SF Symbol name; +-- optional duration, detail (centered card only), and tint ("label" or "blue"). +function obj:show(options, fallback) -- Cancel before checking the binary so a fallback also replaces the old toast. local previous = task task = nil @@ -28,7 +29,14 @@ function obj:show(kind, title, fallback) log.w("Native toast failed: " .. tostring(stderr)) fallback() end - end, { kind, title, "2" }) + end, { + options.layout, + options.title, + options.symbol, + tostring(options.duration or 2), + options.detail or "", + options.tint or "label", + }) task = next_task if not next_task or not next_task:start() then task = nil diff --git a/hammerspoon/.hammerspoon/modules/island_hud.lua b/hammerspoon/.hammerspoon/modules/island_hud.lua new file mode 100644 index 00000000..fbc2f266 --- /dev/null +++ b/hammerspoon/.hammerspoon/modules/island_hud.lua @@ -0,0 +1,177 @@ +local obj = {} +local width, height = 200, 40 +local hold = 1.2 +local open_duration, close_duration = 0.21, 0.16 +local top_gap = 20 +local matte = { white = 0.12 } +local hud, timer +local progress, reduce_motion, drip, label_height + +local function stop_timer() + if timer then + timer:stop() + timer = nil + end +end + +function obj.dismiss() + stop_timer() + if hud then + hud:delete() + hud = nil + end +end + +local function system_reduces_motion() + local value = + hs.execute("/usr/bin/defaults read com.apple.universalaccess reduceMotion 2>/dev/null") + return value:match("^%s*1%s*$") ~= nil +end + +local function smoothstep(t) + t = math.max(0, math.min(1, t)) + return t ^ 2 * (3 - 2 * t) +end + +-- Pull a curved neck between the screen edge and the capsule, then pinch it off. +-- The tether is drawn behind the capsule so their overlap reads as one shape. +local function render_tether(fraction, top, w, h) + local tail = 1 - smoothstep((fraction - 0.52) / 0.23) + local depth = (top + h / 2) * tail + if depth <= 0 or tail == 0 then + hud[1].action = "skip" + return + end + + local pinch = 1 - smoothstep((fraction - 0.23) / 0.37) + local center = width / 2 + local shoulder = (16 + 10 * pinch) * tail + local neck = (0.35 + 12 * pinch) * tail + local join = (0.35 + math.min(w * 0.3, 32) * pinch) * tail + local function point(x, y, cx1, cy1, cx2, cy2) + if cx1 then + return { + x = center + x, + y = y, + c1x = center + cx1, + c1y = cy1, + c2x = center + cx2, + c2y = cy2, + } + end + return { x = center + x, y = y } + end + hud[1].coordinates = { + point(-shoulder, 0), + point(shoulder, 0), + point(neck, depth * 0.48, neck, 0, neck, depth * 0.24), + point(join, depth, neck, depth * 0.78, join, depth * 0.88), + point(-join, depth), + point(-neck, depth * 0.48, -join, depth * 0.88, -neck, depth * 0.78), + point(-shoulder, 0, -neck, depth * 0.24, -neck, 0), + } + hud[1].action = "fill" +end + +local function render(fraction) + progress = fraction + if reduce_motion then + hud:alpha(fraction) + return + end + + -- Width leads height, and the label always keeps its original font size. + local remaining = 1 - fraction + local w = width - (width - 34) * remaining ^ 3 + local h = height - (height - 14) * remaining ^ 2 + local top = (height - h) / 2 + if drip then + top = top_gap - (top_gap + 14) * remaining ^ 2 + render_tether(fraction, top, w, h) + hud[3].frame = { x = 0, y = top + (h - label_height) / 2, w = width, h = label_height } + end + hud[2].frame = { x = (width - w) / 2, y = top, w = w, h = h } + hud[2].roundedRectRadii = { xRadius = h / 2, yRadius = h / 2 } + hud[3].textColor = { white = 1, alpha = smoothstep((fraction - 0.32) / 0.4) } + hud:alpha(math.min(1, fraction * 5)) +end + +local function animate_to(target, duration, on_done) + stop_timer() + local start = progress + local seconds = duration * math.abs(target - start) + if seconds == 0 then + on_done() + return + end + local started = hs.timer.absoluteTime() + timer = hs.timer.doEvery(1 / 60, function() + local elapsed = (hs.timer.absoluteTime() - started) / 1e9 + local t = math.min(1, elapsed / seconds) + render(start + (target - start) * t) + if t == 1 then + stop_timer() + on_done() + end + end) +end + +-- Reuse the current HUD for successive messages, even if it is still moving. +function obj.show(title, position) + assert(position == "top" or position == "bottom", 'HUD position must be "top" or "bottom"') + local screen = hs.screen.mainScreen() + if not screen then + obj.dismiss() + return + end + local frame = screen:frame() + local inset = math.min(96, frame.h * 0.12) + local x = frame.x + (frame.w - width) / 2 + local at_top = position == "top" + local y = at_top and frame.y or frame.y + frame.h - inset - height + local previous = hud and hud:frame() + if previous and previous.x == x and previous.y == y then + hud[3].text = title + else + obj.dismiss() + reduce_motion = system_reduces_motion() + drip = at_top and not reduce_motion + local gap = at_top and top_gap or 0 + local font, size = ".AppleSystemUIFont", 14 + label_height = + math.ceil(hs.drawing.getTextDrawingSize(title, { font = font, size = size }).h) + hud = hs.canvas.new({ x = x, y = y, w = width, h = height + gap }) + hud:appendElements({ + type = "segments", + action = "skip", + closed = true, + fillColor = matte, + }, { + type = "rectangle", + action = "fill", + frame = { x = 0, y = gap, w = width, h = height }, + roundedRectRadii = { xRadius = height / 2, yRadius = height / 2 }, + fillColor = matte, + }, { + type = "text", + text = title, + textFont = font, + textSize = size, + textColor = { white = 1 }, + textAlignment = "center", + frame = { x = 0, y = gap + (height - label_height) / 2, w = width, h = label_height }, + }) + render(0) + hud:level(hs.canvas.windowLevels.overlay):show() + end + + local opening = reduce_motion and 0.15 or (drip and 0.25 or open_duration) + local closing = reduce_motion and 0.18 or (drip and 0.19 or close_duration) + animate_to(1, opening, function() + timer = hs.timer.doAfter(hold, function() + animate_to(0, closing, obj.dismiss) + end) + end) +end + +return obj diff --git a/hammerspoon/.hammerspoon/modules/plugins.lua b/hammerspoon/.hammerspoon/modules/plugins.lua index 9855e631..c00a1017 100644 --- a/hammerspoon/.hammerspoon/modules/plugins.lua +++ b/hammerspoon/.hammerspoon/modules/plugins.lua @@ -1,6 +1,12 @@ hs.loadSpoon("SpoonInstall") -spoon.SpoonInstall:andUse("ReloadConfiguration", { start = true }) +-- Stow links the config into $HOME. FSEvents does not follow those links into the checkout. +local init_path = hs.fs.pathToAbsolute(hs.configdir .. "/init.lua") +local source_dir = init_path and init_path:match("^(.+)/[^/]+$") or hs.configdir +spoon.SpoonInstall:andUse("ReloadConfiguration", { + config = { watch_paths = { source_dir } }, + start = true, +}) spoon.SpoonInstall:andUse("LookupSelection", { hotkeys = { lexicon = { HYPER, "d" } } }) diff --git a/hammerspoon/.hammerspoon/native/GlassToast.swift b/hammerspoon/.hammerspoon/native/GlassToast.swift index 0c72e8c0..af7c0b2d 100644 --- a/hammerspoon/.hammerspoon/native/GlassToast.swift +++ b/hammerspoon/.hammerspoon/native/GlassToast.swift @@ -16,35 +16,29 @@ final class AppDelegate: NSObject, NSApplicationDelegate { func applicationDidFinishLaunching(_ notification: Notification) { let args = Array(CommandLine.arguments.dropFirst()) - guard args.count <= 3 else { - fail("usage: glass-toast [enabled|disabled|reload] [title] [seconds]") + guard (3...6).contains(args.count) else { + fail("usage: glass-toast <symbol> [seconds] [detail] [tint]") + } + let compact: Bool + switch args[0] { + case "compact-bottom": compact = true + case "centered-card": compact = false + default: fail("unknown layout: \(args[0])") + } + let title = args[1] + let symbol = args[2] + let duration = args.count > 3 ? Double(args[3]) ?? .nan : 2 + let detailText = args.count > 4 ? args[4] : "" + guard !compact || detailText.isEmpty else { + fail("compact-bottom only supports one line of text") } - let kind = args.first ?? "enabled" - let symbol: String - let defaultTitle: String - let message: String let tint: NSColor - switch kind { - case "reload": - symbol = "arrow.clockwise" - defaultTitle = "Hammerspoon Reloaded" - message = "Your configuration is ready." - tint = .systemBlue - case "disabled": - symbol = "moon.zzz.fill" - defaultTitle = "Caffeine Disabled" - message = "Normal display sleep restored." - tint = .secondaryLabelColor - case "enabled": - symbol = "cup.and.saucer.fill" - defaultTitle = "Caffeine Enabled" - message = "Your display will stay awake." - tint = .systemGreen - default: - fail("unknown kind: \(kind)") + let tintName = args.count > 5 ? args[5] : "label" + switch tintName { + case "label": tint = .labelColor + case "blue": tint = .systemBlue + default: fail("unknown icon tint: \(tintName)") } - let title = args.count > 1 ? args[1] : defaultTitle - let duration = args.count > 2 ? Double(args[2]) ?? .nan : 2 guard duration.isFinite, (0.2...30).contains(duration) else { fail("duration must be between 0.2 and 30 seconds") } @@ -52,11 +46,21 @@ final class AppDelegate: NSObject, NSApplicationDelegate { fail("no screen available") } - let size = NSSize(width: 360, height: 64) + let heading = NSTextField(labelWithString: title) + heading.font = .systemFont(ofSize: 14, weight: .semibold) + heading.textColor = .labelColor + + let iconSize: CGFloat = compact ? 18 : 30 + let iconGap: CGFloat = compact ? 8 : 14 + let rowWidth = iconSize + iconGap + heading.intrinsicContentSize.width + let size = + compact + ? NSSize(width: max(200, ceil(rowWidth) + 32), height: 40) + : NSSize(width: 360, height: 64) let frame = screen.visibleFrame let rect = NSRect( x: frame.midX - size.width / 2, - y: frame.midY - size.height / 2, + y: compact ? frame.minY + min(96, frame.height * 0.12) : frame.midY - size.height / 2, width: size.width, height: size.height ) @@ -81,17 +85,18 @@ final class AppDelegate: NSObject, NSApplicationDelegate { let icon = NSImageView() icon.image = NSImage(systemSymbolName: symbol, accessibilityDescription: nil)? - .withSymbolConfiguration(NSImage.SymbolConfiguration(pointSize: 24, weight: .medium)) + .withSymbolConfiguration( + NSImage.SymbolConfiguration(pointSize: compact ? 16 : 24, weight: .medium)) icon.contentTintColor = tint icon.translatesAutoresizingMaskIntoConstraints = false - let heading = NSTextField(labelWithString: title) - heading.font = .systemFont(ofSize: 14, weight: .semibold) - heading.textColor = .labelColor - let detail = NSTextField(labelWithString: message) - detail.font = .systemFont(ofSize: 12) - detail.textColor = .secondaryLabelColor - let labels = NSStackView(views: [heading, detail]) + let labels = NSStackView(views: [heading]) + if !detailText.isEmpty { + let detail = NSTextField(labelWithString: detailText) + detail.font = .systemFont(ofSize: 12) + detail.textColor = .secondaryLabelColor + labels.addArrangedSubview(detail) + } labels.orientation = .vertical labels.alignment = .leading labels.spacing = 4 @@ -99,13 +104,15 @@ final class AppDelegate: NSObject, NSApplicationDelegate { content.addSubview(icon) content.addSubview(labels) NSLayoutConstraint.activate([ - icon.leadingAnchor.constraint(equalTo: content.leadingAnchor, constant: 22), + icon.leadingAnchor.constraint( + equalTo: content.leadingAnchor, constant: compact ? (size.width - rowWidth) / 2 : 22), icon.centerYAnchor.constraint(equalTo: content.centerYAnchor), - icon.widthAnchor.constraint(equalToConstant: 30), - icon.heightAnchor.constraint(equalToConstant: 30), - labels.leadingAnchor.constraint(equalTo: icon.trailingAnchor, constant: 14), + icon.widthAnchor.constraint(equalToConstant: iconSize), + icon.heightAnchor.constraint(equalToConstant: iconSize), + labels.leadingAnchor.constraint(equalTo: icon.trailingAnchor, constant: iconGap), labels.centerYAnchor.constraint(equalTo: content.centerYAnchor), - labels.trailingAnchor.constraint(lessThanOrEqualTo: content.trailingAnchor, constant: -22), + labels.trailingAnchor.constraint( + lessThanOrEqualTo: content.trailingAnchor, constant: compact ? -16 : -22), ]) self.panel = panel diff --git a/hammerspoon/.hammerspoon/native/README.md b/hammerspoon/.hammerspoon/native/README.md index 1c3dfe3d..40745443 100644 --- a/hammerspoon/.hammerspoon/native/README.md +++ b/hammerspoon/.hammerspoon/native/README.md @@ -1,6 +1,6 @@ # Native glass toast prototype -A centered, click-through, non-activating AppKit panel for caffeine and reload feedback. +A click-through, non-activating AppKit toast with compact-bottom and centered layouts. `make native` also builds the interactive Launcher chooser; see [`Launcher.spoon`](../vendored/Launcher.spoon/README.md) for that UI and its API. Both helpers use `GlassBackground.swift` for the same native material. @@ -18,36 +18,32 @@ make native make preview-glass ``` -The preview does **not** change display-sleep prevention. To preview the other state: +To preview the centered layout: ```sh -native/.build/glass-toast disabled "Caffeine Disabled" 4 +native/.build/glass-toast centered-card "Changes Saved" checkmark 4 \ + "Your configuration is ready." blue ``` -To preview startup/reload feedback: - -```sh -native/.build/glass-toast reload "Hammerspoon Reloaded" 4 -``` - -Arguments are kind (`enabled`, `disabled`, or `reload`), optional title, and optional hold -seconds (0.2–30; default 2). Invalid arguments exit nonzero with a diagnostic -so Hammerspoon can fall back to canvas. The panel centers on AppKit's main -screen, fades in and out, and exits. Hammerspoon replaces the previous process on rapid toggles. +The CLI takes `layout title symbol [seconds] [detail] [tint]`. The layouts are +`compact-bottom` (one line) and `centered-card` (optional detail). `symbol` is an +SF Symbol name, hold time is 0.2–30 seconds (default 2), and tint is `label` +(default) or `blue`. Callers choose the copy, symbol, and timing; the helper +only renders them. Invalid arguments exit nonzero with a diagnostic so +Hammerspoon can fall back to canvas. The panel fades in and out on AppKit's +main screen, then exits. The wrapper replaces the previous toast on a new request. This short-lived process is intentionally a prototype, not a persistent service. ## Hammerspoon integration -Stow the `hammerspoon` package so `~/.hammerspoon/native` points here, build, -then reload Hammerspoon. Cmd+Ctrl+0 uses the native toast for caffeine; -startup/reload uses it with an `arrow.clockwise` SF Symbol and blue tint. -Other alerts still use the existing canvas renderer. The Lua wrapper falls back -to canvas if the binary is missing or fails to run; it never compiles on a hotkey. +Caffeine (Cmd+Ctrl+0) and startup/reload feedback both use the matte canvas HUD +in `modules/island_hud.lua`, with a shared `hud_position` setting in `init.lua`. +Neither requires the native toast. The glass helper remains available for +standalone previews or callers that want either glass layout. The generated executable lives in ignored `native/.build/`. Rebuild after source changes; builds replace the executable atomically, and a binary is not distributed -or committed. To disable the prototype, remove `native/.build/glass-toast`; -caffeine and reload will use the canvas again. +or committed. ## Corner geometry @@ -60,7 +56,8 @@ for guidance on using regular glass for text-heavy overlays. `GlassGeometry` in `GlassBackground.swift` owns our chosen dimensions: -- Toast: 16-point outer radius, 360×64-point visible surface. The radius matches +- Toast: 16-point outer radius. `compact-bottom` uses a 200×40-point visible surface + (wider for longer titles as needed); `centered-card` uses 360×64 points. The radius matches AppKit's reported effective corners for a standard titled, resizable window on the current macOS host; it is not a universal value for every window style. - Launcher: 16-point outer radius, matching the toast and the measured window style. @@ -89,7 +86,7 @@ xcrun swift-format lint --strict native/*.swift tests/test_glass_geometry.swift ``` The wrapper tests use mock tasks and do not show UI or change caffeine state. -They cover native launch, replacement, fallback, stale callbacks, and reload -arguments. Preview each kind to check rendering and focus behavior on macOS. +They cover native arguments, launch, replacement, fallback, and stale callbacks. +Preview each layout to check rendering and focus behavior on macOS. The older-macOS visual-effect fallback requires separate visual testing on an older host. diff --git a/hammerspoon/.hammerspoon/tests/test_glass_toast.lua b/hammerspoon/.hammerspoon/tests/test_glass_toast.lua index 1492fe0a..cd4df593 100644 --- a/hammerspoon/.hammerspoon/tests/test_glass_toast.lua +++ b/hammerspoon/.hammerspoon/tests/test_glass_toast.lua @@ -46,18 +46,36 @@ function test.run() fallbacks = fallbacks + 1 end + local compact = { + layout = "compact-bottom", + title = "Muted", + symbol = "speaker.slash", + duration = 1.4, + } + local card = { + layout = "centered-card", + title = "Saved", + symbol = "checkmark", + detail = "Changes are ready.", + tint = "blue", + } + exists = false - toast:show("reload", "Hammerspoon Reloaded", fallback) + toast:show(card, fallback) assert(fallbacks == 1 and #tasks == 0, "missing binary should fall back") exists = true - toast:show("enabled", "Enabled", fallback) - assert(tasks[1].running and tasks[1].args[1] == "enabled", "should start native helper") + toast:show(compact, fallback) + assert(tasks[1].running, "should start native helper") + assert( + table.concat(tasks[1].args, "|") == "compact-bottom|Muted|speaker.slash|1.4||label", + "should pass compact layout, copy, symbol, duration, and default tint" + ) assert( tasks[1].path == "/test/native/.build/glass-toast", "should resolve config-relative binary" ) - toast:show("disabled", "Disabled", fallback) - assert(tasks[1].terminated and tasks[2].args[1] == "disabled", "should replace previous toast") + toast:show(card, fallback) + assert(tasks[1].terminated and tasks[2].running, "should replace previous toast") assert(fallbacks == 1, "termination of replaced toast must not fall back") tasks[1].callback(1, "", "stale failure") assert(fallbacks == 1, "late callback from replaced toast must be ignored") @@ -65,28 +83,33 @@ function test.run() tasks[2].callback(1, "", "failure") assert(fallbacks == 2, "helper failure should fall back") starts = false - toast:show("enabled", "Enabled", fallback) + toast:show(compact, fallback) assert(fallbacks == 3, "start failure should fall back") tasks[#tasks].callback(1, "", "late start failure") assert(fallbacks == 3, "start failure must not fall back twice") creates = false - toast:show("enabled", "Enabled", fallback) + toast:show(compact, fallback) assert(fallbacks == 4, "task creation failure should fall back") creates, starts = true, true - toast:show("reload", "Hammerspoon Reloaded", fallback) - assert(tasks[#tasks].args[1] == "reload", "should pass reload kind to helper") - assert(tasks[#tasks].args[2] == "Hammerspoon Reloaded", "should pass reload title to helper") + toast:show(card, fallback) + assert( + table.concat(tasks[#tasks].args, "|") + == "centered-card|Saved|checkmark|2|Changes are ready.|blue", + "should pass card layout, copy, symbol, default duration, detail, and tint" + ) tasks[#tasks].callback(0, "", "") assert(fallbacks == 4, "normal exit must not fall back") - toast:show("enabled", "Enabled", fallback) + toast:show(compact, fallback) local previous = tasks[#tasks] exists = false - toast:show("reload", "Hammerspoon Reloaded", fallback) + toast:show(card, fallback) assert(previous.terminated, "missing binary fallback should cancel the previous toast") assert(fallbacks == 5, "missing binary should fall back exactly once after cancellation") previous.callback(1, "", "late failure") assert(fallbacks == 5, "cancelled helper must not fall back again") - print("PASS: glass toast fallback, replacement, stale callback, reload, and normal exit tests") + print( + "PASS: glass toast arguments, fallback, replacement, stale callback, and normal exit tests" + ) end return test