fix: wifi widget shows connected when VPN is active#118
Open
bottlebrushes wants to merge 55 commits intomocki-toki:mainfrom
Open
fix: wifi widget shows connected when VPN is active#118bottlebrushes wants to merge 55 commits intomocki-toki:mainfrom
bottlebrushes wants to merge 55 commits intomocki-toki:mainfrom
Conversation
…aying Replace aggressive 0.3s AppleScript polling with DistributedNotificationCenter observers for instant media updates. Changes: - Listen to Spotify (`com.spotify.client.PlaybackStateChanged`) and Apple Music (`com.apple.Music.playerInfo`) notifications - Only poll every 1s for position updates (progress bar) when playing - Fetch track info on-demand when notifications fire - Add initial fetch on startup to populate current state This significantly reduces CPU usage and provides instant UI updates when track changes or playback state changes. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add WeatherWidget displaying current temperature and weather icon - Use Open-Meteo free API (no API key required) - Dynamic SF Symbols based on weather conditions (sun, clouds, rain, snow, etc.) - Location-based weather with CoreLocation - Click to open macOS Weather dropdown - Add SystemUIHelper for triggering system UI elements - Add required entitlements for location and network access 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace polling-based space monitoring with event-driven updates: - Add SpaceEvent enum and EventBasedSpacesProvider protocol - Implement Unix socket listener in YabaiProvider - Update SpacesViewModel to handle space events reactively Yabai signals now send events to /tmp/barik-yabai.sock for instant updates. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add WeatherPopup matching Barik's dark theme style - Show location name, current temp, condition, high/low - Display hourly forecast with icons and precipitation % - Add "Open Weather" button to launch macOS Weather app - Extend WeatherManager with hourly data and location name via geocoding 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Run initial space fetch asynchronously in startObserving() - Run refreshSpaces() on background queue - Dispatch results back to main thread for UI updates - Fixes SwiftUI AttributeGraph crash from blocking main thread 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add `click-action` config option to TimeWidget - Supports "calendar" (default) or "notification-center" - When set to "notification-center", clicking time opens macOS Notification Center Usage in config.toml: ```toml [widgets.default.time] click-action = "notification-center" ``` 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add `click-action` config option to TimeWidget ("calendar" or "notification-center")
- Request Accessibility permission before opening Notification Center
- System prompts user to grant permission if not already allowed
Usage:
```toml
[widgets.default.time]
click-action = "notification-center"
```
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Changed from SOCK_DGRAM to SOCK_STREAM for nc -U compatibility - Added listen() and accept() for stream socket handling - Fixes event-based space subscription not receiving messages 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add WiFi toggle switch at the top - Show connected network in "Known Network" section - Add expandable "Other Networks" section with available networks - Add network scanning functionality - Add "Wi-Fi Settings..." button to open System Preferences - Fixed width to 280px for consistent appearance 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace fragile AppleScript approach with CGEvent keyboard simulation. Simulates Ctrl+Option+N keypress which user has mapped to Notification Center. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Remove unnecessary Y offset that pushed popups down by half their height. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Use widgetRect.maxY to position popups just below the clicked widget instead of using a fixed foreground height. This ensures popups appear at the correct vertical position regardless of widget location. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Adjusted popup offset calculation and added anchor: .top to scaleEffect so popups animate and position correctly below the Barik menu bar. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Battery: use IOPSNotificationCreateRunLoopSource instead of 1s timer - Calendar: use EKEventStoreChangedNotification instead of 5s timer - WiFi: use CWEventDelegate for SSID/link changes, reduce RSSI polling to 30s - Spaces: use NSWorkspace notifications instead of 100ms fallback timer - MenuBarPopup: use DispatchWorkItem + asyncAfter instead of Timer This significantly reduces CPU usage and improves power efficiency by responding to system events rather than continuously polling. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…ve-polling feat: replace polling with event-driven notifications
- Changed from center-based positioning (.position()) to top-aligned positioning (.topLeading alignment with offset) - All popups now appear at exactly the same Y level regardless of content height - Popup top edge aligns precisely with the bottom of the Barik menu bar using foregroundHeight directly - X positioning centers popup under widget with edge constraints Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add dayView variant to MenuBarPopupVariantView for calendar-style layouts - Implement CalendarDayViewPopup showing today's schedule on the left and tomorrow's events on the right (mimicking macOS sidebar calendar) - Add expandable all-day events section with click-to-expand - Fix tap gesture detection on TimeWidget and NowPlayingWidget by using .contentShape(Rectangle()) instead of transparent background hack Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
…ails (#3) * fix: improve calendar day view popup sizing and add today's all-day events - Add all-day events display to today column (was only showing tomorrow's) - Fix popup height to fit content using fixedSize modifier - Reduce hour range to 9am-5pm and height to 24pt for compact display - Set fixed column widths (180pt today, 220pt tomorrow) to prevent resize on expand Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * feat: add calendar selection UI and event detail view - Add CalendarSettingsView with toggle for each calendar - Use calendarIdentifier instead of title to handle duplicate calendar names - Add ExpandedEventView that shows full event details when clicking an event - CalendarManager now subscribes to config changes for automatic refresh - Add updateConfigValueRaw to ConfigManager for TOML array values Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Adds tap gesture handlers to the album cover, song title, and artist in the now playing popup. Clicking these elements opens the currently playing music application (Spotify or Apple Music). Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* feat: click album art or song info to open music player Adds tap gesture handlers to the album cover, song title, and artist in the now playing popup. Clicking these elements opens the currently playing music application (Spotify or Apple Music). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * docs: update README for barik-but-better fork - Remove maintenance notice - Add improvements section highlighting fork enhancements - Rename to barik-but-better Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
- Add WiFi popup and weather popup to improvements list - Emphasize CPU usage reduction as the key benefit Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
…enter, and made it ensure accessibility permissions are granted
The music widget was dropped from the default widget list when it was renamed from "default.spotify" to "default.nowplaying". Add it back and accept the old name as an alias for backwards compatibility. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…music-widget fix: restore now playing widget in default config
Adds a new menu bar widget that displays Claude Code API usage as a circular donut ring around the Claude icon. Tracks 5-hour rolling window and weekly message counts from ~/.claude/ data files with real-time file watching (no polling). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…de-usage-widget feat: add Claude Code usage tracking widget
Allow users to drag widgets to reorganize their order directly in the menu bar. The new order persists to ~/.barik-config.toml automatically. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…g-reorder-widgets feat: drag-and-drop widget reordering
feat: Improved notification center openning setup
Add GitHub Actions workflow that builds and publishes a release on every push to main. Update README with Homebrew and build-from-source install instructions for the fork. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…g-reorder-widgets ci: auto-build releases + update README
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…g-reorder-widgets docs: update improvements list in README
The widget now hides itself when there's no Claude usage data available instead of always rendering in the menu bar. Also fixes message counting to scan session JSONL files in ~/.claude/projects/ (capturing Conductor and agent sessions) rather than only reading history.jsonl which misses programmatic sessions. Tool-result API continuations are filtered out so only real conversation turns are counted. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace local file scanning with Anthropic's OAuth usage API for accurate rate limit data. Defer keychain permission to explicit user action via "Allow Access" button in popup. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…e-empty-claude-widget feat: use Anthropic usage API with deferred keychain access
Adds a new default.pomodoro widget with countdown timer, work/break/long break phases, circular progress ring popup, session tracking, adjustable durations via in-popup settings, and macOS notifications on phase changes. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…odoro-timer feat: add pomodoro timer widget
Add UNUserNotificationCenterDelegate so macOS displays banner notifications even when Barik is in the foreground. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…odoro-timer fix: show pomodoro notifications while app is active
Add a settings UI to choose which calendar app opens when clicking "Open in Calendar" on an event. Detects installed apps (Apple Calendar, Notion Calendar, Fantastical, BusyCal) and persists the selection. Button text updates dynamically to show the selected app name. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…ion-cal-open Add configurable default calendar app
The CI build used CODE_SIGNING_ALLOWED=NO, producing an unsigned app. macOS Gatekeeper rejects unsigned downloaded apps with an unrecoverable "damaged and should be moved to Trash" error. Ad-hoc signing changes this to a bypassable "unidentified developer" warning. Also adds a troubleshooting section to the README with the xattr workaround. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…-brew-damaged-app fix: ad-hoc sign app in CI to prevent macOS damaged error
Replace the timer SF Symbol with a custom tomato SVG template icon for the pomodoro widget. The icon changes color by phase (white idle, red working, green break, blue long break). Defer Claude usage keychain access from app startup to when the popup is opened, so users aren't prompted for permissions on launch. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…-brew-damaged-app feat: tomato icon and deferred Claude permissions
Calendar icon in the menu bar shows days remaining. Clicking opens a popup with the full countdown message and a settings panel to change the label, month, day, and year. Defaults to Christmas countdown. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace the default countdown text with a tomato icon that fills/depletes clockwise to show remaining time. The outline stays opaque while the interior fill sweeps away. Adds "Show timer" toggle in popup settings to opt into the classic text countdown, and a notification permission prompt. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…ntdown-widget feat: pomodoro fill icon mode & countdown widget
* feat: add right-click context menu for toggling widgets Right-click anywhere on the menu bar to toggle widgets on/off, edit the config file, or quit Barik. Uses an NSEvent monitor to intercept right-clicks on the menu bar panel since NSHostingView doesn't forward them to the AppKit menu property. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix: allow dragging widgets to the leftmost position Add an invisible leading drop target so widgets can be dragged all the way to the left edge of the menu bar. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Countdown settings (label, target date) now save to UserDefaults so they survive app restarts. Calendar icon expands when showing 3+ digit days. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…ntdown-persist-fix Fix countdown widget persistence & 3-digit width
The timer-based polling stops when macOS sleeps, leaving the widget stale. Now observes NSWorkspace.didWakeNotification to restart the timer and immediately fetch fresh data on wake. Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
When a VPN routes traffic through a tunnel interface (utun), NWPathMonitor reports usesInterfaceType(.wifi) as false even though WiFi is physically connected. Fall back to CoreWLAN's rssiValue() to detect whether WiFi is associated with a network — rssiValue() returns negative dBm when connected and doesn't require location authorization unlike ssid(). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use --cleanup-tag on gh release delete so the tag is removed atomically with the release, instead of a separate git push that can fail silently. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
NWPathMonitorreportsusesInterfaceType(.wifi)asfalsebecause traffic routes through a tunnel interface (utun), causing the widget to incorrectly show WiFi as disconnectedrssiValue()to detect whether WiFi is physically associated — returns negative dBm when connected, 0 when notrssiValue()doesn't require location authorization (unlikessid()), so it works reliably across all build configurationsTest plan
🤖 Generated with Claude Code