macOS: map Left Option to Control+Option+Command for GlazeWM

Open
#60 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
55/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
lua
Domain
devtools

Research direction

Read the GlazeWM Karabiner rule in macos/core/stowed/.config/karabiner/karabiner.json, the bindings in macos/glazewm/stowed/.glzr/glazewm/config.yaml, and the README section and comments naming Option+Command. Update the modifiers and references, then verify the bindings and the listed macOS shortcuts on a Mac, including Control+Option+Command+8. Done means all bindings work and the specified fallback cases cause no harmful actions.

Written by the indexing model from the issue text.

Description

Follow-up to #55.

Problem

On macOS, Karabiner turns Left Option+key into Option+Command+key while GlazeWM runs, and GlazeWM binds the alt+cmd+… combinations. When GlazeWM doesn't take a key, the app or macOS gets the Option+Command combination. That happens before Accessibility is granted, while GlazeWM manages no windows, or while a password field has Secure Keyboard Entry on.

Many Option+Command combinations already mean something. Of our bindings:

  • Option+Command+H hides other apps, and Option+Command+M minimizes all windows of the app.
  • Option+Command+Space opens a Finder search window.
  • Option+Command+T, +V, +P and +N are Finder toolbar, move, path bar and new-folder shortcuts, and +F is find and replace in many editors.
  • Option+Shift+Command+Q logs out at once. #55 moved close to alt+cmd+shift+c for that reason.

Proposal

Map Left Option+key to Control+Option+Command+key instead, and bind ctrl+alt+cmd+… in GlazeWM. Apps and macOS use few Control+Option+Command combinations. Known ones: Control+Option+Command+8 inverts colors, but only when that accessibility shortcut is on (off by default). Control+Command+Q locks the screen, but macOS matches modifiers exactly, so adding Option shouldn't trigger it. Check this on the Mac.

To do

  1. In macos/core/stowed/.config/karabiner/karabiner.json, add left_control to the GlazeWM rule's to modifiers.
  2. In macos/glazewm/stowed/.glzr/glazewm/config.yaml, change every alt+cmd+ binding to ctrl+alt+cmd+.
  3. Update the README section and the comments that name Option+Command.

For the Mac agent to check

  1. Do all bindings still work?
  2. With GlazeWM quit from its menu, before the helper clears the variable (about a second), or with Accessibility off: do Left Option+Shift+Q, +H, +M and +8 do nothing harmful?
  3. Is Control+Option+Command+8 (invert colors) off on the managed Mac?
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

  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.

More from Gelio/dotfiles

All issues in Gelio/dotfiles

Similar issues

More Lua issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.