@@ -19,6 +19,7 @@ final class SquirrelApplicationDelegate: NSObject, NSApplicationDelegate, SPUSta
1919 var panel : SquirrelPanel ?
2020 var enableNotifications = false
2121 let updateController = SPUStandardUpdaterController ( startingUpdater: true , updaterDelegate: nil , userDriverDelegate: nil )
22+ let statusBarManager = StatusBarManager ( )
2223 var supportsGentleScheduledUpdateReminders : Bool {
2324 true
2425 }
@@ -61,6 +62,7 @@ final class SquirrelApplicationDelegate: NSObject, NSApplicationDelegate, SPUSta
6162 // swiftlint:disable:next notification_center_detachment
6263 NotificationCenter . default. removeObserver ( self )
6364 DistributedNotificationCenter . default ( ) . removeObserver ( self )
65+ statusBarManager. teardown ( )
6466 panel? . hide ( )
6567 }
6668
@@ -162,6 +164,8 @@ final class SquirrelApplicationDelegate: NSObject, NSApplicationDelegate, SPUSta
162164 }
163165
164166 enableNotifications = config!. getString ( " show_notifications_when " ) != " never "
167+ let showStatusInMenuBar = config!. getBool ( " menubar_ascii_mode " ) ?? true
168+ statusBarManager. setup ( enabled: showStatusInMenuBar)
165169 if let panel = panel, let config = self . config {
166170 panel. load ( config: config, forDarkMode: false )
167171 panel. load ( config: config, forDarkMode: true )
@@ -284,6 +288,7 @@ private extension SquirrelApplicationDelegate {
284288 func showStatusMessage( msgTextLong: String ? , msgTextShort: String ? ) {
285289 if !( msgTextLong ?? " " ) . isEmpty || !( msgTextShort ?? " " ) . isEmpty {
286290 panel? . updateStatus ( long: msgTextLong ?? " " , short: msgTextShort ?? " " )
291+ statusBarManager. updateStatus ( text: msgTextShort ?? " " )
287292 }
288293 }
289294
0 commit comments