Skip to content

Hide dock icon and add quit button to menu bar app#6

Merged
Aayush9029 merged 3 commits into
mainfrom
copilot/add-hide-app-icon-option
Nov 17, 2025
Merged

Hide dock icon and add quit button to menu bar app#6
Aayush9029 merged 3 commits into
mainfrom
copilot/add-hide-app-icon-option

Conversation

Copilot AI commented Nov 17, 2025

Copy link
Copy Markdown
Contributor

Plan: Add ability to hide app icon in dock

Based on the issue requirements and agent instructions, I need to:

  • Set the app to use accessory mode (LSUIElement) to hide the dock icon
  • Add a Quit button in the menu bar UI (below temperature controls)
  • Remove the softness slider from the UI
  • Test the changes to ensure they work correctly
  • Address PR review feedback

Implementation Complete ✅

Changes Made:

  1. Modified RingLight.xcodeproj/project.pbxproj

    • Added INFOPLIST_KEY_LSUIElement = YES to both Debug and Release build configurations
    • This makes the app run as an accessory/agent application, hiding it from the Dock
    • The app will only appear in the menu bar
  2. Updated RingLight/Features/RingLight/Views/ContentView.swift

    • ✅ Commented out the "Softness" slider section (instead of removing) for future reference
    • ✅ Added a Divider before the Quit button for better visual separation
    • ✅ Added a Quit button below the temperature preset row
    • The Quit button uses .plain button style for a minimal look
    • Button calls NSApplication.shared.terminate(nil) to properly exit the app

Technical Details:

  • LSUIElement: Setting this to YES makes the app run as an "agent" or "accessory" application
  • Quit Button: Essential for LSUIElement apps because users can't use Cmd+Q
  • Softness/Feather Property: Commented out in UI but property still exists with default value (0.4)

Security Summary:

✅ No security vulnerabilities detected. CodeQL analysis showed no issues with the changes.

Original prompt

This section details on the original issue you should resolve

<issue_title>Add ability to do hide app icon in dock</issue_title>
<issue_description>The app is amazing.

Please add ability to hide app icon from Dock. That would also mean that you need to put Quit button inside of the menu app.</issue_description>

<agent_instructions>You can always keep the launch mode as accessory. As for the quit button, you can just add a button with the button style plane underneath the view for the Menu bar, not underneath, but Just below the temperature controls. Also, remove the softness slider. That's not necessary, I think.</agent_instructions>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: Aayush9029 <43297314+Aayush9029@users.noreply.github.com>
Copilot AI changed the title [WIP] Add ability to hide app icon in dock Hide dock icon and add quit button to menu bar app Nov 17, 2025
Copilot AI requested a review from Aayush9029 November 17, 2025 13:01
Slider(value: $controller.intensity, in: 0.1...1)
}

parameterSection(title: "Softness", valueLabel: String(format: "%.0f%%", controller.feather * 100)) {

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment it out incase I want tot bring it back in the future

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done! The softness slider is now commented out instead of removed (c9596fb).

}

TemperaturePresetRow(controller: controller)

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add a divider here

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a Divider before the quit button for visual separation (c9596fb).

Co-authored-by: Aayush9029 <43297314+Aayush9029@users.noreply.github.com>
Copilot AI requested a review from Aayush9029 November 17, 2025 17:31
@Aayush9029 Aayush9029 marked this pull request as ready for review November 17, 2025 19:28
@Aayush9029 Aayush9029 merged commit ac93c19 into main Nov 17, 2025
1 check passed
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.

Add ability to do hide app icon in dock

2 participants