@@ -194,38 +194,35 @@ func (app *App) setTrayTitle() {
194194 var title string
195195 var iconType IconType
196196
197- // On Linux, always show counts if there are any PRs
198- // This helps since not all desktop environments show the text
199- if runtime .GOOS == "linux" && (counts .IncomingTotal > 0 || counts .OutgoingTotal > 0 ) {
200- // Show blocked/total format for better visibility
201- if counts .IncomingBlocked > 0 && counts .OutgoingBlocked > 0 {
202- title = fmt .Sprintf ("%d/%d • %d/%d" , counts .IncomingBlocked , counts .IncomingTotal , counts .OutgoingBlocked , counts .OutgoingTotal )
197+ // On macOS, show counts with the icon
198+ // On all other platforms (Linux, Windows, FreeBSD, etc), just show the icon
199+ if runtime .GOOS == "darwin" {
200+ // macOS: show counts alongside icon
201+ switch {
202+ case counts .IncomingBlocked == 0 && counts .OutgoingBlocked == 0 :
203+ title = ""
204+ iconType = IconSmiling
205+ case counts .IncomingBlocked > 0 && counts .OutgoingBlocked > 0 :
206+ title = fmt .Sprintf ("%d / %d" , counts .IncomingBlocked , counts .OutgoingBlocked )
203207 iconType = IconBoth
204- } else if counts .IncomingBlocked > 0 {
205- title = fmt .Sprintf ("%d/%d " , counts .IncomingBlocked , counts . IncomingTotal )
208+ case counts .IncomingBlocked > 0 :
209+ title = fmt .Sprintf ("%d" , counts .IncomingBlocked )
206210 iconType = IconGoose
207- } else if counts . OutgoingBlocked > 0 {
208- title = fmt .Sprintf ("%d/%d " , counts .OutgoingBlocked , counts . OutgoingTotal )
211+ default :
212+ title = fmt .Sprintf ("%d" , counts .OutgoingBlocked )
209213 iconType = IconPopper
210- } else {
211- // No blocked PRs but there are PRs
212- title = fmt .Sprintf ("0/%d" , counts .IncomingTotal + counts .OutgoingTotal )
213- iconType = IconSmiling
214214 }
215215 } else {
216- // Original behavior for other platforms
216+ // All other platforms: icon only, no text
217+ title = ""
217218 switch {
218219 case counts .IncomingBlocked == 0 && counts .OutgoingBlocked == 0 :
219- title = ""
220220 iconType = IconSmiling
221221 case counts .IncomingBlocked > 0 && counts .OutgoingBlocked > 0 :
222- title = fmt .Sprintf ("%d / %d" , counts .IncomingBlocked , counts .OutgoingBlocked )
223222 iconType = IconBoth
224223 case counts .IncomingBlocked > 0 :
225- title = fmt .Sprintf ("%d" , counts .IncomingBlocked )
226224 iconType = IconGoose
227225 default :
228- title = fmt .Sprintf ("%d" , counts .OutgoingBlocked )
229226 iconType = IconPopper
230227 }
231228 }
@@ -788,7 +785,7 @@ func (app *App) addStaticMenuItems(ctx context.Context) {
788785 // Add checkbox items for each org
789786 for _ , org := range orgs {
790787 orgName := org // Capture for closure
791- // Add text checkmark for Linux
788+ // Add text checkmark for all platforms
792789 var orgText string
793790 if hiddenOrgs [orgName ] {
794791 orgText = "✓ " + orgName
@@ -797,122 +794,90 @@ func (app *App) addStaticMenuItems(ctx context.Context) {
797794 }
798795 orgItem := hideOrgsMenu .AddSubMenuItem (orgText , "" )
799796
800- // Check if org is currently hidden (for non-Linux)
801- if runtime .GOOS != "linux" && hiddenOrgs [orgName ] {
802- orgItem .Check ()
803- }
804-
805797 orgItem .Click (func () {
806798 app .mu .Lock ()
807799 if app .hiddenOrgs [orgName ] {
808800 delete (app .hiddenOrgs , orgName )
809- if runtime .GOOS != "linux" {
810- orgItem .Uncheck ()
811- }
812801 slog .Info ("[SETTINGS] Unhiding org" , "org" , orgName )
813802 } else {
814803 app .hiddenOrgs [orgName ] = true
815- if runtime .GOOS != "linux" {
816- orgItem .Check ()
817- }
818804 slog .Info ("[SETTINGS] Hiding org" , "org" , orgName )
819805 }
820806 app .mu .Unlock ()
821807
822808 // Save settings
823809 app .saveSettings ()
824810
825- // Note: Menu needs manual refresh on Linux to see changes
811+ // Rebuild menu to update checkmarks
812+ app .rebuildMenu (ctx )
826813 })
827814 }
828815 }
829816
830817 // Hide stale PRs
831- // Add 'Hide stale PRs' option with text checkmark for Linux
818+ // Add 'Hide stale PRs' option with text checkmark for all platforms
832819 var hideStaleText string
833820 if app .hideStaleIncoming {
834821 hideStaleText = "✓ Hide stale PRs (>90 days)"
835822 } else {
836823 hideStaleText = "Hide stale PRs (>90 days)"
837824 }
838825 hideStaleItem := app .systrayInterface .AddMenuItem (hideStaleText , "" )
839- if runtime .GOOS != "linux" && app .hideStaleIncoming {
840- hideStaleItem .Check ()
841- }
842826 hideStaleItem .Click (func () {
843827 app .mu .Lock ()
844828 app .hideStaleIncoming = ! app .hideStaleIncoming
845829 hideStale := app .hideStaleIncoming
846830 app .mu .Unlock ()
847831
848- if runtime .GOOS != "linux" {
849- if hideStale {
850- hideStaleItem .Check ()
851- } else {
852- hideStaleItem .Uncheck ()
853- }
854- }
855-
856832 // Save settings to disk
857833 app .saveSettings ()
858834
859- // Note: Menu needs manual refresh on Linux to see changes
860835 slog .Info ("[SETTINGS] Hide stale PRs toggled" , "enabled" , hideStale )
836+
837+ // Rebuild menu to update checkmarks
838+ app .rebuildMenu (ctx )
861839 })
862840
863841 // Add login item option (macOS only)
864842 addLoginItemUI (ctx , app )
865843
866844 // Audio cues
867- // Add 'Audio cues' option with text checkmark for Linux
845+ // Add 'Audio cues' option with text checkmark for all platforms
868846 app .mu .RLock ()
869847 var audioText string
870848 if app .enableAudioCues {
871849 audioText = "✓ Honks enabled"
872850 } else {
873851 audioText = "Honks enabled"
874852 }
875- enableAudioCues := app .enableAudioCues
876853 app .mu .RUnlock ()
877854 audioItem := app .systrayInterface .AddMenuItem (audioText , "Play sounds for notifications" )
878- if runtime .GOOS != "linux" && enableAudioCues {
879- audioItem .Check ()
880- }
881855 audioItem .Click (func () {
882856 app .mu .Lock ()
883857 app .enableAudioCues = ! app .enableAudioCues
884858 enabled := app .enableAudioCues
885859 app .mu .Unlock ()
886860
887- if runtime .GOOS != "linux" {
888- if enabled {
889- audioItem .Check ()
890- } else {
891- audioItem .Uncheck ()
892- }
893- }
894-
895861 slog .Info ("[SETTINGS] Audio cues toggled" , "enabled" , enabled )
896862
897863 // Save settings to disk
898864 app .saveSettings ()
865+
866+ // Rebuild menu to update checkmarks
867+ app .rebuildMenu (ctx )
899868 })
900869
901870 // Auto-open blocked PRs in browser
902- // Add 'Auto-open PRs' option with text checkmark for Linux
871+ // Add 'Auto-open PRs' option with text checkmark for all platforms
903872 app .mu .RLock ()
904873 var autoText string
905874 if app .enableAutoBrowser {
906875 autoText = "✓ Auto-open incoming PRs"
907876 } else {
908877 autoText = "Auto-open incoming PRs"
909878 }
910- enableAutoBrowser := app .enableAutoBrowser
911879 app .mu .RUnlock ()
912880 autoOpenItem := app .systrayInterface .AddMenuItem (autoText , "Automatically open newly blocked PRs in browser (rate limited)" )
913- if runtime .GOOS != "linux" && enableAutoBrowser {
914- autoOpenItem .Check ()
915- }
916881 autoOpenItem .Click (func () {
917882 app .mu .Lock ()
918883 app .enableAutoBrowser = ! app .enableAutoBrowser
@@ -923,18 +888,13 @@ func (app *App) addStaticMenuItems(ctx context.Context) {
923888 }
924889 app .mu .Unlock ()
925890
926- if runtime .GOOS != "linux" {
927- if enabled {
928- autoOpenItem .Check ()
929- } else {
930- autoOpenItem .Uncheck ()
931- }
932- }
933-
934891 slog .Info ("[SETTINGS] Auto-open blocked PRs toggled" , "enabled" , enabled )
935892
936893 // Save settings to disk
937894 app .saveSettings ()
895+
896+ // Rebuild menu to update checkmarks
897+ app .rebuildMenu (ctx )
938898 })
939899
940900 // Quit
0 commit comments