Add visual status indicator for auto-clicker menubar icon#3
Open
O-mkar wants to merge 1 commit intoWorldOfBasti:masterfrom
Open
Add visual status indicator for auto-clicker menubar icon#3O-mkar wants to merge 1 commit intoWorldOfBasti:masterfrom
O-mkar wants to merge 1 commit intoWorldOfBasti:masterfrom
Conversation
- Menubar icon turns green when auto-clicker is active, reverts to default when inactive - Added clickerStatusChanged(notification:) in AppDelegate to handle icon updates - Added createTintedImage(from:tintColor:) helper to tint icon with NSColor.systemGreen - Registered NotificationCenter observer for .clickerStatusChanged in applicationDidFinishLaunching - Added notifyStatusChanged() in AutoClicker posting .clickerStatusChanged with isActive payload - Defined Notification.Name.clickerStatusChanged extension in AutoClicker.swift - All UI updates dispatched on main thread for thread safety Made-with: Cursor
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
Added a visual status indicator to the menubar icon that changes color when the auto-clicker is active, making it easier for users to see at a glance whether clicking is currently running.
Changes Made
• Enhanced menubar icon feedback: The menubar icon now turns green when the auto-clicker is active and returns to the default appearance when inactive
• Added clickerStatusChanged(notification:) method: Listens for clicker status changes via NotificationCenter
• Added createTintedImage(from:tintColor:) helper method: Creates a colored version of the icon using Core Graphics
• Registered NotificationCenter observer: Listens for .clickerStatusChanged notifications in applicationDidFinishLaunching
Technical Details
• Uses NSImage drawing APIs to create a tinted version of the menubar icon
• Green color (NSColor.systemGreen) applied when auto-clicker is active
• Original template icon restored when auto-clicker is inactive (maintains light/dark mode compatibility)
• All UI updates performed on main thread for thread safety
Visual Changes
Before: Menubar icon remained the same color regardless of auto-clicker status
After:
• 🟢 Green icon = Auto-clicker is active
• ⚫ Default icon = Auto-clicker is inactive
Testing
• [x] Icon changes to green when auto-clicker starts
• [x] Icon returns to default when auto-clicker stops
• [x] Works in both light and dark mode
• [x] No crashes or performance issues
Related Issues
Addresses user feedback requesting visual confirmation of auto-clicker status