Skip to content

feat(wm): switch to OmniWM (remove aerospace) - #125

Merged
gapul merged 4 commits into
mainfrom
feat/omniwm-trial
Aug 3, 2026
Merged

feat(wm): switch to OmniWM (remove aerospace)#125
gapul merged 4 commits into
mainfrom
feat/omniwm-trial

Conversation

@gapul

@gapul gapul commented Aug 3, 2026

Copy link
Copy Markdown
Owner

概要

OmniWM トライアルを終了し、aerospace を撤去して OmniWM を正式な WM にする。

  • cask: aerospace + nikitabobko/tap を削除(rebuild で cleanup=uninstall が効いてアンインストールされる)
  • borders: aerospace の after-startup-command 起動が消えるため、nix 宣言の launchd agent (org.nix-community.home.borders → bordersrc 実行) に移行。手書きの legacy com.felixkratz.borders.plist(旧カラーハードコード)は activation で bootout + 削除
  • Login Items: OmniWM を登録、AeroSpace の残骸エントリは activation で掃除
  • justfile: doctor / restart を OmniWM 対象に更新。トライアル用 just wm トグルは削除(just restart omniwm に集約)
  • 削除: configs/wm/aerospace/(aerospace.toml + aerolog.sh)と scripts/aerospace-config.sh
  • bootstrap.sh: TCC 許可チェックリストを OmniWM に更新

キーバインド(コミット外・ランタイム設定)

~/.config/omniwm/settings.toml(app-managed、nix 非管理)の hotkey を aerospace の hyper 帯 (Cmd+Ctrl+Alt) に揃えた。focus/move の HJKL・workspace 1-9・back-and-forth (Tab)・fullscreen (F)・float (V)・monitor (N/M)・resize (-/=)・balance (Shift+=)・split (\) を移植し、Hyper+2 切替 → Hyper+Tab 復帰を実機で動作確認済み。

検証

  • nix eval .#darwinConfigurations.{gapul,macmini}.system.drvPath 通過
  • pre-commit (deadnix / gitleaks / nixfmt / shellcheck) 通過
  • マージ後 just rebuild で aerospace アンインストール + borders agent 常駐が適用される

gapul added 2 commits August 3, 2026 09:04
- barutsrb/tap + omniwm cask in darwin.nix (already brew-installed imperatively;
  this keeps it across rebuilds with cleanup=uninstall)
- ~/.config/omniwm stays app-managed: hotkeys are GUI-configured and the
  settings.toml schema is undocumented, so no nix generation for now
- just wm [omniwm|aerospace|status] switches the running WM; aerospace stays
  installed and remains the login item until the trial concludes
- helpers/wm.sh: query abstraction (focused ws, monitors, workspaces,
  windows->apps, focus) that auto-detects the running WM and dispatches
  to aerospace CLI or omniwmctl(IPC)+jq
- spaces.sh / space_windows.sh / space.sh / front_app.sh / sketchybarrc:
  replace direct aerospace calls with wm.sh functions (event name and
  AEROSPACE_* env names kept for compatibility)
- helpers/omniwm-bridge.sh + omniwm-event.sh: resident bridge that
  converts 'omniwmctl watch active-workspace,windows-changed' events
  into the existing aerospace_workspace_change trigger (omniwm has no
  exec action). Wired as launchd agent omniwm-bridge in darwin-chrome.nix;
  idles while aerospace is active
- display_watch.sh: build the display map from omniwmctl when OmniWM runs
- requires omniwm ipcEnabled = true (already set in ~/.config/omniwm)

Tested live against OmniWM 0.5.9: items build from omniwm data, focus
highlight follows workspace switches, empty workspaces stay hidden.
@gapul

gapul commented Aug 3, 2026

Copy link
Copy Markdown
Owner Author

sketchybarのOmniWM対応を追加 (2ce0ecb)。

  • helpers/wm.sh: 稼働中WMをpgrepで自動判別してaerospace CLI / omniwmctl(IPC)+jqに振り分ける照会抽象化。spaces.sh以下のwidget群はこれ経由に置き換え(イベント名とAEROSPACE_*環境変数名は互換のため温存)
  • helpers/omniwm-bridge.sh + omniwm-event.sh: omniwmctl watch (active-workspace, windows-changed) を aerospace_workspace_change に変換する常駐ブリッジ。launchd agent omniwm-bridge として宣言(darwin-chrome.nix)。aerospace稼働中はsleepループで無害
  • display_watch.sh: OmniWM稼働時はomniwmctlからディスプレイマップを生成
  • 前提: omniwm settings.toml の ipcEnabled = true (設定済み)

OmniWM 0.5.9で実機確認済み: アイテム生成・フォーカスハイライト追従・空ワークスペース非表示・アイコン列更新。

注意: 動作確認のため現在 ~/.config/sketchybar はworktreeへのsymlinkに一時差し替え中(バックアップ ~/.config/sketchybar.hm-bak)。マージ後のrebuild前に rm -rf ~/.config/sketchybar && mv ~/.config/sketchybar.hm-bak ~/.config/sketchybar で復元すること。

…rders

- drop aerospace cask + nikitabobko/tap; OmniWM is the main WM now
- borders: aerospace after-startup-command is gone, so declare a launchd
  agent running bordersrc; boot out the legacy hand-written
  com.felixkratz.borders plist (hardcoded colors) on activation
- login items: OmniWM registered, stale AeroSpace entry dropped
- justfile: doctor/restart target OmniWM; remove the trial-era wm toggle
- delete configs/wm/aerospace (aerospace.toml + aerolog) and
  scripts/aerospace-config.sh (history has them)
- bootstrap checklist: TCC/permission steps now reference OmniWM
@gapul gapul changed the title feat(wm): OmniWM trial swap (cask + just wm toggle) feat(wm): switch to OmniWM (remove aerospace) Aug 3, 2026
@gapul
gapul merged commit 82eee86 into main Aug 3, 2026
3 checks passed
@gapul
gapul deleted the feat/omniwm-trial branch August 3, 2026 01:03
gapul added a commit that referenced this pull request Aug 8, 2026
…ice label (#165)

* fix(sketchybar): drop the aerospace leftovers and the stale brew service label

aerospace was removed in #125 but the sketchybar helpers still called
/opt/homebrew/bin/aerospace. wm.sh fell back to that binary whenever OmniWM was
not running, so instead of failing it quietly returned nothing and the bar went
blank; refresh-displays.sh depended on it outright and could not work at all.

Also two labels that #161 invalidated: `just restart sketchybar` and
app_guard's restart command still pointed at homebrew.mxcl.sketchybar, which no
longer exists now that the agent is org.nix-community.home.sketchybar.

Puddle is added to the app_guard list — it had silently not been running, which
is exactly what that list is for.

Kept as-is: the aerospace_workspace_change event name, the AEROSPACE_* env vars
and /tmp/sketchybar-aero-display.map. They are consistent between the firing
side and the reading side, so renaming changes no behaviour and only widens the
diff.

* refactor(sketchybar): rename the aerospace-era identifiers to omniwm

Event aerospace_workspace_change -> omniwm_workspace_change, AEROSPACE_* ->
OMNIWM_*, /tmp/sketchybar-aero-display.map -> sketchybar-omniwm-display.map.
Both the firing side (omniwm-event.sh) and every reading side are renamed in
the same commit; a half rename would leave the event reaching nobody.
gapul added a commit that referenced this pull request Aug 8, 2026
* fix(sketchybar): drop the aerospace leftovers and the stale brew service label

aerospace was removed in #125 but the sketchybar helpers still called
/opt/homebrew/bin/aerospace. wm.sh fell back to that binary whenever OmniWM was
not running, so instead of failing it quietly returned nothing and the bar went
blank; refresh-displays.sh depended on it outright and could not work at all.

Also two labels that #161 invalidated: `just restart sketchybar` and
app_guard's restart command still pointed at homebrew.mxcl.sketchybar, which no
longer exists now that the agent is org.nix-community.home.sketchybar.

Puddle is added to the app_guard list — it had silently not been running, which
is exactly what that list is for.

Kept as-is: the aerospace_workspace_change event name, the AEROSPACE_* env vars
and /tmp/sketchybar-aero-display.map. They are consistent between the firing
side and the reading side, so renaming changes no behaviour and only widens the
diff.

* refactor(sketchybar): rename the aerospace-era identifiers to omniwm

Event aerospace_workspace_change -> omniwm_workspace_change, AEROSPACE_* ->
OMNIWM_*, /tmp/sketchybar-aero-display.map -> sketchybar-omniwm-display.map.
Both the firing side (omniwm-event.sh) and every reading side are renamed in
the same commit; a half rename would leave the event reaching nobody.

* chore(wallpaper): drop the HTML/JS wallpapers, keep only Metal

Puddle renders the .metal shaders natively — lsof shows it holding globe.metal
open with the Metal shader caches, and it sits at ~1% CPU, which an HTML canvas
polling state.js every 300ms would not. The six .html files and system-theme.js
were left over from the WebView era and nothing reads them.

With them go the state.js writer in omniwm-event.sh (a gitignored file inside
the repo that the WM rewrote on every workspace switch) and its .gitignore
entry. Workspace linkage now runs solely through the inputs files that the
Metal contract reads.

Puddle's own websites list still holds four file:// entries pointing at the
deleted HTML. They are app-side state, not rendered, and harmless; clear them
from Puddle's settings when convenient.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant