← All repositories

listless

A simple list app for Apple platforms

git clone https://code.inqk.net/listless.git


commit 3b84343d8354578deb962acdb4906e234fbd1731
parent 2053123e3315c29cf527688f6934b5d1f0761104
Author: Michael Camilleri <[email protected]>
Date:   Sat, 18 Apr 2026 13:55:35 +0900

Add instrumentation code to Mac app launching

Diffstat

MListlessMac/ListlessMacApp.swift | 5+++++

1 file changed, 5 insertions(+), 0 deletions(-)

diff --git a/ListlessMac/ListlessMacApp.swift b/ListlessMac/ListlessMacApp.swift

@@ -41,6 +41,11 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSMenuItemValidation {
     }
 
     func applicationDidFinishLaunching(_ notification: Notification) {
+        let ae = NSAppleEventManager.shared().currentAppleEvent
+        let aeID = ae.map { String(format: "0x%08x", $0.eventID) } ?? "nil"
+        let userInfoKeys = (notification.userInfo?.keys.map { "\($0)" } ?? []).joined(separator: ",")
+        NSLog("[Listless launch] aeID=\(aeID) userInfoKeys=[\(userInfoKeys)] argv=\(CommandLine.arguments)")
+
         NSWindow.allowsAutomaticWindowTabbing = false
         applyAppearanceMode(UserDefaults.standard.integer(forKey: Self.appearanceModeKey))
         keyValueSyncBridge.start()