Repository navigation
Make the Mac's moon key toggle Do Not Disturb instead of suspending - #646
Open
nosferatuboi wants to merge 1 commit into
Open
nosferatuboi wants to merge 1 commit into
nosferatuboi wants to merge 1 commit into
Conversation
Member
|
Thanks, this is still wanted. This week the Mac code moved into the omarchy-mac package and the platform files moved to the |
The MacBook top row's moon key (F6) is Do Not Disturb, but the kernel reports it as KEY_SLEEP and logind suspends on it by default, so one tap puts the Mac to sleep. omarchy-mac now ships a logind drop-in that ignores the sleep key and binds XF86Sleep to Do Not Disturb on Apple Silicon. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
nosferatuboi
force-pushed
the
fix/apple-f6-do-not-disturb
branch
from
September 30, 2026 05:56
07cce3a to
c5fd503
Compare
Author
|
Rebased onto |
This was referenced Oct 4, 2026
This branch has not been deployed
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.
On a MacBook, one tap of the top row's moon key (F6, Do Not Disturb in macOS) suspends the Mac. The kernel reports that key as
KEY_SLEEP, and logind's defaultHandleSuspendKey=suspendacts on it. Omarchy already takes the power key from logind (HandlePowerKey=ignore) but not the sleep key. Found on a MacBook Air M1 (J313):systemd-logind: Suspend key pressed short.→Suspending....What changed, all in
omarchy-mac, so other machines' Sleep keys keep suspending:vendor/systemd/logind.conf.d/20-omarchy-mac-sleep-key.confsetsHandleSuspendKey=ignoreandHandleSuspendKeyLongPress=ignore. It installs to/usr/lib/systemd/logind.conf.d, so a same-name/etcdrop-in still wins. It takes effect from the next boot or logind reload; setup still restarts nothing.apple.luabindsXF86Sleeptoomarchy-toggle-notification-silencingalongside the other Mac default bindings, soomarchy_default_bindings = falsedrops it too.apple-platform-hooks-test.shasserts that the Mac binds the moon key and that no other machine does. The package'ssystemd-test.shasserts that the staged drop-in is present. The new hook assertion fails with the bind removed.apple.luadefaults.Tested on the MacBook Air M1 (linux-asahi 7.1.13, Hyprland 0.56.2):
HandleSuspendKeyreads"ignore". Across about 10 F6 presses, logind logged eachSuspend key pressed short.and made no suspend entry.hyprctl eval, the samehl.bindpathapple.luagoes through), F6 toggled the Do Not Disturb indicator. One physical press gives one key event, so it doesn't flicker.omarchy-toggle-notification-silencingflips the state off → on → off.packages/omarchy-mac/test/allandtest/shell.d/apple-platform-hooks-test.shpass.🤖 Generated with Claude Code