SagerNet / SagerNet/sing-box

SFM: Hide Dock icon when the last window is closed while keeping the service running

Open
#4,536 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
38.2k
Forks
4.6k
Avg merge
19d 15h
Merged PRs (30d)
1

Description

Feature request

Please add an option for SFM to hide its Dock icon when the last window is closed, while keeping the menu bar icon and proxy/tunnel service running.

Current behavior

With both Show in Menu Bar and Keep Menu Bar in Background enabled, closing the window with the red close button still leaves SFM visible in the Dock on my setup. I could not find a separate setting to hide the Dock icon.

Expected behavior
  1. Enable menu bar/background operation and start the service.
  2. Close the last SFM window using the red close button.
  3. SFM disappears from the Dock but remains accessible from the menu bar, and the service continues uninterrupted.
  4. The main window can be reopened from the menu bar.

An optional “Hide Dock icon when all windows are closed” setting would also work. The goal is to keep a frequently running proxy utility out of the Dock without quitting it.

Environment
  • macOS 26.6.2
  • SFM standalone 1.14.1 (build 1)
  • Show in Menu Bar: enabled
  • Keep Menu Bar in Background: enabled
Related issue

#2934 describes missing menu bar / Dock behavior at login. This request specifically concerns hiding the Dock icon after manually closing the last window, while retaining menu bar access and the running service.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the SFM standalone macOS window lifecycle and the existing “Show in Menu Bar” and “Keep Menu Bar in Background” settings. Reproduce closing the last window with the service running, then verify that the Dock icon disappears, the menu bar icon and service remain active, and the main window can be reopened from the menu bar.

Written by the indexing model from the issue text.

Assessment

Tech stack
macos
Domain
desktop
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.