macOS: restore GlazeWM's Karabiner variable after Karabiner restarts
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 82/100
Research direction
Read macos/glazewm/stowed/.local/bin/glazewm-helper, focusing on the main loop, written, and sync_once. Clear written about once a minute so the current value is rewritten, while preserving the immediate start write and shutdown reset. With GlazeWM running, restart Karabiner-Elements and confirm the bindings return within about a minute.
Written by the indexing model from the issue text.
Description
Follow-up to #55. Low priority: rare, and fails safe.
Problem
macos/glazewm/stowed/.local/bin/glazewm-helper keeps Karabiner's glazewm_running variable in step with GlazeWM. It writes the variable only when the value changes from the last value it wrote (written).
Karabiner keeps variables in memory. When Karabiner's core service restarts, for example after a Karabiner-Elements update or a manual restart, the variable is back to unset. The helper still has written=1, so it never writes it again. The Left Option rule stays off and the GlazeWM bindings stop working until GlazeWM restarts or the Mac wakes from sleep (the wake path rewrites it).
This fails safe: with the rule off, Left Option+key reaches apps as plain Option+key.
CodeRabbit flagged the same thing on #55.
Fix
In the main loop, clear written about once a minute so the next sync_once writes the current value again. One karabiner_cli call a minute is cheap. Keep the immediate write on GlazeWM start and the shutdown command's immediate reset.
For the Mac agent to check
- With GlazeWM running, restart Karabiner-Elements (quit and reopen it, or
launchctl kickstart -kon its core service if allowed). Do the GlazeWM bindings come back within about a minute?
- Dominant language
- Lua
- Stars
- 10
- Forks
- 2
- Avg merge
- 4h 53m
- Merged PRs (30d)
- 30
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Gelio/dotfiles
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Gelio/dotfiles#63 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 69/100
grumpycoders/pcsx-redux#2667 ·
-
needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
coder/claudecode.nvim#588 ·
Maintainers usually reply within 1 day
-
documentation night-shift
Difficulty 1/5 Under an hour Newbie friendliness 90/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
nvim-telescope/telescope.nvim#3718 ·
Maintainers usually reply within 1 day
-
bug discord guide:leatherworking locale:enUS triage v0.3.6
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
Maintainers usually reply within 1 day