Skip to content

Add visual status indicator for auto-clicker menubar icon#3

Open
O-mkar wants to merge 1 commit intoWorldOfBasti:masterfrom
O-mkar:feature/visual-status-indicator
Open

Add visual status indicator for auto-clicker menubar icon#3
O-mkar wants to merge 1 commit intoWorldOfBasti:masterfrom
O-mkar:feature/visual-status-indicator

Conversation

@O-mkar
Copy link

@O-mkar O-mkar commented Feb 28, 2026

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 .clicker​Status​Changed notifications in application​Did​Finish​Launching

Technical Details
• Uses NSImage drawing APIs to create a tinted version of the menubar icon
• Green color (NSColor​.system​Green) 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

- 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant