Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions omarchy-mac/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# omarchy-mac

Apple Silicon defaults and support services for Omarchy. Version: `0.1.2` (candidate). This add-on complements `omarchy` and `omarchy-settings`; it selects no kernel and contains no installer or repository trust configuration. It covers what stays on an installed Mac; installing one is the job of the [Omarchy Installer](https://github.com/omacom/omarchy-mac-installer), and boot support is the separate `omarchy-mac-boot` package beside this one.
Apple Silicon defaults and support services for Omarchy. Version: `0.1.3` (candidate). This add-on complements `omarchy` and `omarchy-settings`; it selects no kernel and contains no installer or repository trust configuration. It covers what stays on an installed Mac; installing one is the job of the [Omarchy Installer](https://github.com/omacom/omarchy-mac-installer), and boot support is the separate `omarchy-mac-boot` package beside this one.

## Build and stage

Expand All @@ -14,7 +14,7 @@ Upgrade the matching runtime, settings and add-on candidates in one pacman trans

Run `omarchy-mac-setup-system` as root on the target hardware (inside its target chroot for offline provisioning). An optional absolute root argument supports staging against the same target hardware without a bus. It exits without changes unless the runtime's Apple predicate `omarchy-hw-apple-silicon` holds (`omarchy-hw-platform` reports `aarch64-apple`, or `apple-silicon` on a runtime from before the platform rename), and fails if the detector does. It removes the Intel Mac Broadcom quirk (`options brcmfmac feature_disable=0x82000`, which breaks Apple Silicon Wi-Fi) from `/etc/modprobe.d/brcmfmac.conf` wherever an unguarded runtime migration appended it: only that exact line, with the comment block and blank line written right above it, goes; the file goes when nothing but blank lines is left, a link is left alone with the manual fix, and the initramfs rebuild it owes is recorded under `/var/lib/omarchy/migrations/1789172112-initramfs-pending`, which the runtime's migration finishes. It enables resume recovery only for BCM4378, BCM4387 and BCM4388 on Apple Silicon; Intel/T2 Macs are excluded. It is the only enabler of `speakersafetyd`, without which the kernel keeps the speakers muted: it applies the package's `80-omarchy-mac-audio.preset` once speakersafetyd is installed, so `/etc` presets that sort before it or replace it by name, masks and later explicit disables win, and image builders that apply presets get the same result. A live run also restarts a speakersafetyd left dead by a start-limit. No NetworkManager restart or driver reload occurs during setup. The backend applies when NetworkManager next starts; notch changes apply when appledrm next loads. A live run gives iwd a profile for each Wi-Fi network NetworkManager saved with its key before the switch, as NetworkManager itself does for a new connection, so saved networks keep connecting instead of reading as a wrong password. The greeter drop-in needs no setup: from the next `sddm` start it holds the greeter, for at most 10 s, until Apple's display controller has replaced the boot framebuffer.

Run `omarchy-mac-setup-user` as each target user with their HOME/XDG directories. It enables the vendor unit without a session bus. It writes nothing into the user's Hyprland files; a block an earlier version appended to `input.lua` or `looknfeel.lua` stays, as the user's. With a live bus, reached only through XDG_RUNTIME_DIR (which `sudo -i` clears), it reloads the user manager, reports the effective unit and starts the mapper. The mapper makes its stereo monitor the default input only if a brief sample finds signal, and hands a silent one back to the DSP source. A muted mapping, on either side (the mute key mutes the sink side while the monitor is the default), is the user's microphone mute and is left alone. Provisioning and first run call setup; subsequent session starts only start the enabled unit, without reloading the user manager or repeating setup. The first desktop session does not depend on a bus existing during installation. Custom fragments, masks, activation links and headset or speaker policies are preserved; setup markers preserve explicit disables after initial setup. User gain state remains in `omarchy/asahi-mic-gain.json` under XDG_STATE_HOME. The desktop saves that state before restarting audio.
Run `omarchy-mac-setup-user` as each target user with their HOME/XDG directories. It enables the vendor unit without a session bus. It writes nothing into the user's Hyprland files; a block an earlier version appended to `input.lua` or `looknfeel.lua` stays, as the user's. With a live bus, reached only through XDG_RUNTIME_DIR (which `sudo -i` clears), it reloads the user manager, reports the effective unit and starts the mapper. The mapper makes the microphone a typed stereo source, `omarchy_asahi_mic` ("MacBook Microphone"): pipewire-pulse's `module-remap-source` records asahi-audio's mono DSP source, which WirePlumber links to the left side and the mapper to the right, and offers an `Audio/Source` with front-left and front-right, the shape of a stock microphone, so the desktop's audio panel drives its volume, mute and level meter as it does any other. It makes that source the default input only if a brief sample finds signal, and hands a silent one back to the DSP source. A muted mapping is the user's microphone mute and is left alone. On upgrade from 0.1.2 the mapper replaces 0.1.2's virtual source of the same name (an `Audio/Source/Virtual`, which the panel gives no level meter) on its next start, keeping its gain, mute and selection. Provisioning and first run call setup; subsequent session starts only start the enabled unit, without reloading the user manager or repeating setup. The first desktop session does not depend on a bus existing during installation. Custom fragments, masks, activation links and headset or speaker policies are preserved; setup markers preserve explicit disables after initial setup. User gain state remains in `omarchy/asahi-mic-gain.json` under XDG_STATE_HOME. The desktop saves that state before restarting audio.

A runtime whose `omarchy-lifecycle-dispatch` has the `setup-system` and `setup-user` operations (the platform setup seam, which registers `/usr/lib/omarchy/mac` for Apple Silicon) reaches both through the entrypoints this package stages there; an older runtime calls the two commands itself: `setup-system [image-first-boot]` (root, from the last hardware leaf and on an image's first boot, where it downloads nothing; it rebuilds no boot file) and `setup-user` (as the user being set up, at finalization and again in first run). Each re-checks the platform.

Expand All @@ -25,7 +25,7 @@ The Mac's hardware data lives in the platform root, `/usr/share/omarchy-platform
- `key-names`: the keybindings menu shows `XF86MonBrightnessUp` and `Down` as the F2 and F1 they are.
- `display-cutouts.json`: the notch of each MacBook panel (the 14" Pro measured at 64 physical rows, the 16" Pro inferred at 64 and the Airs at 56), which the bar keeps clear of. A notched panel not listed gets no floor until the file lists it; `[bar] notch-height` in `shell.toml` only adjusts the floor of a listed panel.
- `displays.conf`: `omarchy-hw-display` never picks the Touch Bar's `display-pipe` or `228600000.dsi.0` backlight and prefers the Retina panel's `apple-panel-bl` (no GPU backlight exists), and `omarchy-brightness-display` probes an external monitor over DDC only when its connector has a `ddc` node, since Apple's display driver registers no DDC channel and a probe would walk the SoC's SMBus for about 3 s.
- `audio.json`: the audio panel and microphone widget leave out asahi-audio's DSP internals: the speaker graph's output stream into the raw speakers (`effect_output.jNNN-convolver`, and the desktops' `mini`/`studio`), the microphone graph's always-running capture of the raw array (`audio_effect.jNNN-mic`), the raw devices asahi-audio marks do-not-use (`RawSpeakers`, `RawMics`), and the mono DSP microphone while the mapper's stereo `omarchy_asahi_mic` exists. The runtime drives that mapping, a virtual source Quickshell leaves untyped, through `wpctl` without a hint. A runtime older than the platform root reads no audio hints and keeps its own Apple checks.
- `audio.json`: the audio panel and microphone widget leave out asahi-audio's DSP internals: the speaker graph's output stream into the raw speakers (`effect_output.jNNN-convolver`, and the desktops' `mini`/`studio`), the microphone graph's always-running capture of the raw array (`audio_effect.jNNN-mic`), the raw devices asahi-audio marks do-not-use (`RawSpeakers`, `RawMics`), the mapper's own capture of the DSP microphone (`input.omarchy_asahi_mic`), which would otherwise count as an app recording, and the mono DSP microphone while the mapper's stereo `omarchy_asahi_mic` exists. A runtime older than the platform root reads no audio hints and keeps its own Apple checks.
- `keyrings`: `asahi-alarm-keyring`, the signing keyring of the `[asahi-alarm]` repository. `omarchy update` reinstalls every installed keyring this file names, with Arch Linux ARM's, before the system upgrade, so an Asahi key rotation never fails that upgrade's signature checks.

omarchy-mac is the platform package on Apple Silicon: the recipe declares `provides=('omarchy-platform')` and `conflicts=('omarchy-platform')`, so only one platform package owns the root. Nothing may depend on `omarchy-platform`: the provide exists for the conflict, and a dependency on it could pull this package onto another machine.
Expand Down
76 changes: 0 additions & 76 deletions omarchy-mac/bin/omarchy-audio-asahi-mic-level

This file was deleted.

Loading
Loading