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
15 changes: 8 additions & 7 deletions bin/omarchy-install-gaming-steam
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,17 @@
set -e

echo "Installing Steam..."
if omarchy-hw-apple-silicon; then
omarchy-pkg-add steam omarchy-steam-fex
else
omarchy-pkg-add steam
fi
omarchy-pkg-add steam
omarchy-install-gaming-gpu-lib32

if omarchy-hw-apple-silicon; then
omarchy-launch-steam --prepare
# A platform's setup adds what Steam needs there (on Apple Silicon, the FEX
# launcher and its desktop entry). The resolve is an assignment so an
# undetermined platform stops the install instead of skipping it.
entrypoint=$(omarchy-lifecycle-dispatch --resolve setup-system)
if [[ -n $entrypoint ]]; then
sudo omarchy-lifecycle-dispatch setup-system
fi
omarchy-lifecycle-dispatch setup-user

echo ""
echo "Steam will start automatically now. This might take a while..."
Expand Down
52 changes: 0 additions & 52 deletions default/pacman/apple-silicon/pacman-edge.conf

This file was deleted.

37 changes: 0 additions & 37 deletions default/pacman/apple-silicon/pacman-rc.conf

This file was deleted.

37 changes: 0 additions & 37 deletions default/pacman/apple-silicon/pacman-stable.conf

This file was deleted.

2 changes: 1 addition & 1 deletion docs/file-layout.md
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ The package lists the ISO pacstraps live at `install/omarchy-base.packages`
and `install/omarchy-other.packages`; the ISO builder also reads them when
constructing its offline mirror.

A platform's default package set is the base list plus its architecture's and its platform's additions: `install/omarchy-aarch64.packages` on every aarch64 platform, then `install/omarchy-apple.packages` on Apple Silicon or `install/omarchy-qualcomm.packages` on Qualcomm. `omarchy-pkg-defaults [platform]` prints the composed set (for the running machine by default, via `omarchy-hw-platform`), and `omarchy-reinstall-pkgs` installs it. The pacman repositories follow the platform the same way: `default/pacman/` on x86_64, `default/pacman/aarch64/` on other aarch64 platforms, and `default/pacman/apple-silicon/`, the only one with the Asahi repository, on Apple Silicon.
A platform's default package set is the base list plus its architecture's and its platform's additions: `install/omarchy-aarch64.packages` on every aarch64 platform, then `install/omarchy-apple.packages` on Apple Silicon or `install/omarchy-qualcomm.packages` on Qualcomm. `omarchy-pkg-defaults [platform]` prints the composed set (for the running machine by default, via `omarchy-hw-platform`), and `omarchy-reinstall-pkgs` installs it. The pacman repositories follow the platform the same way: `default/pacman/` on x86_64, `default/pacman/aarch64/` on other aarch64 platforms, and on Apple Silicon the `omarchy-mac` package's `/usr/share/omarchy-mac/pacman/`, the only one with the Asahi repository.

`omarchy-settings` ships the same files on every architecture. The platform-specific ones (the mkinitcpio, Limine, zram and oomd drop-ins) decide at runtime whether they apply; `default/settings-runtime-profile` lists each one and tells the package recipe the source works this way.

Expand Down
8 changes: 5 additions & 3 deletions migrations/1789522888.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
echo "Install the packaged Steam FEX launcher on existing Apple Silicon Steam installs"

# Existing Steam installs, or a Steam library without the package, get the
# launcher (which brings Steam with it) whatever omarchy-mac this Mac has yet;
# omarchy-mac's user setup then prepares Steam's desktop entry for it.
omarchy-hw-apple-silicon || exit 0
omarchy-pkg-present steam || [[ -d $HOME/.local/share/Steam ]] || exit 0
omarchy-pkg-add omarchy-steam-fex
omarchy-cmd-present omarchy-launch-steam || exit 0
omarchy-launch-steam --prepare
omarchy-pkg-present omarchy-steam-fex || omarchy-pkg-add omarchy-steam-fex
omarchy-lifecycle-dispatch setup-user
1 change: 1 addition & 0 deletions packages/omarchy-mac/ORIGINS.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ The network backend default follows Marcelo Alcantara's Apple Silicon integratio
- Apple pacman templates: Marcelo Alcantara, `10df667a4` (Stage each platform's pacman repositories; Omarchy first on Apple Silicon), moved unchanged from `default/pacman/apple-silicon`.
- `omarchy-hw-apple` alias: Scott Jones, `bea1a1ba5` (Preserve optional Apple audio and hardware detection interfaces), moved from the runtime's `bin/`; root no longer falls back to anything but the predicate in `/usr/bin`.
- Three-finger workspace swipe: Marcelo Alcantara, omarchy-mac#629 (`25454328c`, `4ba3490a8`), moved from the runtime's `default/hypr/apple-gestures.lua` into the runtime's platform directory; the gesture registry it reads stays in the runtime's helpers, now on every platform.
- Steam FEX launcher setup: Scott Jones, from the runtime's Steam installer branch and migration `1789522888` (`b5463029e`); the launcher itself is omarchy-pkgs' `omarchy-steam-fex`.
6 changes: 3 additions & 3 deletions packages/omarchy-mac/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Apple Silicon defaults and support services for Omarchy. Version: `0.1.0` (candi

This directory is self-contained. Copy it anywhere, run `./test/all`, then `./install /absolute/staging/root`. Staging requires Bash, coreutils and findutils; tests also use Python and systemd. Nothing is enabled or started by staging. The Arch recipe lives in `omarchy-mac/omarchy-pkgs-aarch64`, on `feature/omarchy-mac-package`, and pins a full collaboration-repository commit.

Runtime dependencies: `omarchy` (the `omarchy-hw-platform` detector and its Apple predicate), Bash, coreutils, diffutils (cmp), grep, sed, gawk, systemd, pciutils, kmod, mkinitcpio, NetworkManager, iwd, Python, PipeWire, pipewire-pulse, libpulse (pactl, parec), WirePlumber, the protected Asahi speaker stack: asahi-audio (which pulls speakersafetyd), alsa-ucm-conf-asahi, rtkit and pipewire-alsa; the Apple Video Decoder's firmware and VA-API driver, avd-fw and libva-v4l2_request-avd; and wf-recorder, which records the screen where gpu-screen-recorder has no encoder. Upgrading this package brings all of them to machines set up before the lists named them. See `ORIGINS.md` for extraction attribution.
Runtime dependencies: `omarchy` (the `omarchy-hw-platform` detector and its Apple predicate), Bash, coreutils, diffutils (cmp), grep, sed, gawk, systemd, pciutils, kmod, mkinitcpio, NetworkManager, iwd, Python, PipeWire, pipewire-pulse, libpulse (pactl, parec), WirePlumber, the protected Asahi speaker stack: asahi-audio (which pulls speakersafetyd), alsa-ucm-conf-asahi, rtkit and pipewire-alsa; the Apple Video Decoder's firmware and VA-API driver, avd-fw and libva-v4l2_request-avd; wf-recorder, which records the screen where gpu-screen-recorder has no encoder; and widevine, Asahi's 16K-page Widevine CDM for DRM streaming. Upgrading this package brings all of them to machines set up before the lists named them. See `ORIGINS.md` for extraction attribution.

## Setup contract

Expand All @@ -16,9 +16,9 @@ Run `omarchy-mac-setup-system` as root on the target hardware (inside its target

Run `omarchy-mac-setup-user` as each target user with their HOME/XDG directories. It enables the vendor unit without a session bus. It also appends a software cursor to `~/.config/hypr/looknfeel.lua` once, unless that file already sets `no_hardware_cursors`; a setup marker keeps a later removal. 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, first-run and the transition migration run 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. Exact per-user copies of mx-mac's speaker no-suspend policy retire in favour of the vendor one. 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; neither needs the network nor rebuilds a boot file, so both runs are the same) and `setup-user` (as the user being set up, at finalization and again in first run). Each re-checks the platform.
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.

System setup also wraps Chromium, 1Password and Cursor where they are installed: without the GPU driver an Apple Silicon Mac has no DRM render node and their GPU process fails, so the runtime's `omarchy-cmd-electron-gl-wrap` puts a wrapper in `/usr/local/bin` that passes software GL flags only while no render node exists; a launcher an administrator owns is kept. User setup points the user's own desktop entries for them at a ready wrapper (`omarchy-cmd-desktop-exec-repair`), appends natural scrolling and physical clicks to `~/.config/hypr/input.lua` once where the file sets neither (Asahi's disable-while-typing does not stop stray taps), and turns `AcceleratedVideoDecoder` off in each Chromium-family `*-flags.conf`, joining an existing `--disable-features` list: Brave and other VA-API builds render green frames through the Apple Video Decoder, while mpv, ffmpeg and GStreamer keep it. A browser install runs user setup again after it writes a fresh flags file. Both Electron steps need the runtime's helpers and the live machine, so a staging root skips them.
System setup also wraps Chromium, 1Password and Cursor where they are installed: without the GPU driver an Apple Silicon Mac has no DRM render node and their GPU process fails, so the runtime's `omarchy-cmd-electron-gl-wrap` puts a wrapper in `/usr/local/bin` that passes software GL flags only while no render node exists; a launcher an administrator owns is kept. User setup points the user's own desktop entries for them at a ready wrapper (`omarchy-cmd-desktop-exec-repair`), appends natural scrolling and physical clicks to `~/.config/hypr/input.lua` once where the file sets neither (Asahi's disable-while-typing does not stop stray taps), and turns `AcceleratedVideoDecoder` off in each Chromium-family `*-flags.conf`, joining an existing `--disable-features` list: Brave and other VA-API builds render green frames through the Apple Video Decoder, while mpv, ffmpeg and GStreamer keep it. A browser install runs user setup again after it writes a fresh flags file. Where Steam is installed, system setup also installs `omarchy-steam-fex` (Steam runs x86 under FEX in a muvm VM) from the configured repositories, and user setup runs its `omarchy-launch-steam --prepare` for a user who has Steam; the runtime's Steam installer reaches both through the dispatcher. These and the Electron steps need the live machine, so a staging root skips them.

Hyprland swipes between workspaces with three fingers on a Mac, as macOS does: `/usr/share/omarchy/default/hypr/platform/apple-gestures.lua`, which Omarchy loads after the user's files, adds the gesture unless the user set a three-finger sideways gesture of their own or `omarchy_workspace_gesture = false` in `~/.config/hypr/input.lua`, so Hyprland never sees a duplicate.

Expand Down
5 changes: 3 additions & 2 deletions packages/omarchy-mac/bin/omarchy-mac-setup-system
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,9 @@ if [[ -z $root && -d /run/systemd/system ]]; then
fi
fi

# The launchers are the live machine's (its binaries and /usr/local/bin), so a
# staging root skips them. Last, so a failure here leaves the rest done.
# The Electron launchers and Steam's FEX launcher are the live machine's, so a
# staging root skips them. Last, so a failure here leaves the services done.
if [[ -z $root ]]; then
"$root/usr/lib/omarchy-mac/electron-launchers"
"$root/usr/lib/omarchy-mac/steam-launcher"
fi
10 changes: 8 additions & 2 deletions packages/omarchy-mac/bin/omarchy-mac-setup-user
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,14 @@ setup_microphone() {

setup_microphone

# Desktop entries for the Electron wrappers are the live machine's, so a
# staging root skips them. Last, so a failure here leaves the rest done.
# Desktop entries for Steam and the Electron wrappers are the live machine's,
# so a staging root skips them. Last, so a failure here leaves the cursor,
# trackpad, browser flags and microphone done.
if [[ -z $root ]]; then
# Steam runs x86 under FEX in a muvm VM; its launcher writes the user's
# desktop entry for itself and patches Steam's UI for it.
if command -v omarchy-launch-steam >/dev/null && { pacman -Q steam >/dev/null 2>&1 || [[ -d $HOME/.local/share/Steam ]]; }; then
omarchy-launch-steam --prepare
fi
"$root/usr/lib/omarchy-mac/electron-desktop-entries"
fi
9 changes: 4 additions & 5 deletions packages/omarchy-mac/entrypoints/setup-system
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@

# omarchy-lifecycle-dispatch setup-system [image-first-boot]. The last hardware
# leaf runs this on every install and hardware rerun, and an image's first
# boot runs it with image-first-boot. omarchy-mac-setup-system needs no network
# and rebuilds no boot file, so both runs are the same. It re-checks the
# platform.
# boot runs it with image-first-boot, where omarchy-mac-setup-system uses no
# network (it rebuilds no boot file either way). It re-checks the platform.

set -euo pipefail

Expand All @@ -14,9 +13,9 @@ if (( $# > 1 )) || { (( $# == 1 )) && [[ $1 != "image-first-boot" ]]; }; then
fi
if (( EUID == 0 )); then
# Root takes nothing from its caller's environment.
exec /usr/bin/env -i PATH=/usr/local/sbin:/usr/local/bin:/usr/bin /usr/bin/omarchy-mac-setup-system
exec /usr/bin/env -i PATH=/usr/local/sbin:/usr/local/bin:/usr/bin OMARCHY_MAC_SETUP_OFFLINE="${1:+1}" /usr/bin/omarchy-mac-setup-system
else
# Unprivileged tests stage the package under a fixture root.
root=${OMARCHY_MAC_ROOT:-}
exec "$root/usr/bin/omarchy-mac-setup-system" ${root:+"$root"}
OMARCHY_MAC_SETUP_OFFLINE="${1:+1}" exec "$root/usr/bin/omarchy-mac-setup-system" ${root:+"$root"}
fi
13 changes: 13 additions & 0 deletions packages/omarchy-mac/lib/steam-launcher
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash
# Steam on Apple Silicon runs x86 under FEX in a muvm VM, which
# omarchy-steam-fex's launcher sets up. omarchy-mac-setup-system installs it,
# from the configured signed repositories, wherever Steam is installed without
# it. An image's first boot (OMARCHY_MAC_SETUP_OFFLINE=1) may be offline and
# downloads nothing; Steam is never part of an image anyway.
set -euo pipefail
[[ $(omarchy-hw-platform) == "apple-silicon" ]] || exit 0
[[ ${OMARCHY_MAC_SETUP_OFFLINE:-} != "1" ]] || exit 0
if pacman -Q steam >/dev/null 2>&1 && ! pacman -Q omarchy-steam-fex >/dev/null 2>&1; then
echo "Installing the Steam FEX launcher"
env OMARCHY_UPDATE_PACMAN=1 pacman -S --needed --noconfirm omarchy-steam-fex
fi
Loading
Loading