Bisect a theme switch that hangs, or that kills btop with SIGABRT
Verified almost verbatim. bin/omarchy-theme-set releases its flock (flock -u 9) right after the shell accepts the transition, then run_parallel launches each of post_theme_commands as bash -lc "$command" & and waits on every pid with no timeout. The fourteen commands are in exactly the order the record lists (omarchy-restart-terminal, -hyprctl, -btop, -opencode, -helix, omarchy-theme-set-foot, -tmux, -gnome, -pi, -claude, -browser, -vscode, -obsidian, -keyboard). omarchy-restart-btop is nothing but pkill -SIGUSR2 btop. OMARCHY_THEME_HEADLESS=1 does skip the whole run_parallel/hook/cache block (it also skips the applyTheme IPC, which is why the follow-up omarchy restart shell is right). Issue #8711 is titled "Theme switching can SIGABRT running btop 1.4.7 via SIGUSR2 reload", cites the out-of-bounds GPU layout access in Gpu::draw() and upstream aristocratos/btop#860. The bisect loop and pkill triage are sound. One error: btop validates show_gpu_info against const vector<string> Config::show_gpu_values = { "Auto", "On", "Off" } (src/btop_config.cpp) case-sensitively, rejecting anything else with "Invalid value for show_gpu_info: ...". Writing "off" lowercase is invalid, so btop discards it and keeps the default. The reader stays on the crashing path.
Do not Ctrl+C out of omarchy update when it hangs inside a theme migration. The migration never writes its marker file, so it re-runs and re-hangs on every subsequent update, and the whole queue behind it stays pending. Kill the individual blocking child instead and let the update carry on. OMARCHY_THEME_HEADLESS=1 also skips the background change and the hook, so use it for diagnosis rather than as a permanent habit.
Symptom
omarchy theme set <name> never returns. The colours changed but the command sits there. Or it returns and something is dead: the classic is btop vanishing, with coredumpctl list btop showing a fresh Signal: 6 (ABRT) timestamped a few hundred milliseconds after the theme was applied, and a stack of std::__glibcxx_assert_fail -> std::vector<std::string>::operator[] -> Gpu::draw(...) -> Runner::_runner(...) failing the assertion __n < this->size().
Cause
Once the staged theme is swapped in and the shell has accepted it, bin/omarchy-theme-set releases its flock and fires run_parallel over post_theme_commands: omarchy-restart-terminal, -hyprctl, -btop, -opencode, -helix, then omarchy-theme-set-foot, -tmux, -gnome, -pi, -claude, -browser, -vscode, -obsidian, -keyboard. Each is launched as bash -lc "$command" & and run_parallel then waits on every pid with **no timeout**, so any single command that blocks blocks the whole theme change. omarchy-restart-btop is nothing but pkill -SIGUSR2 btop, which btop treats as a configuration hot-reload. On Arch's btop 1.4.7 with GPU boxes enabled that reload path indexes Gpu::box out of range and aborts (issue #8711, upstream aristocratos/btop#860). The theme itself always applies. The damage is downstream of it.
Fix
Use the capitalized value btop actually accepts (valid values are exactly "Auto", "On", "Off"), and create the key if the config does not already carry it:
coredumpctl list btop
grep -n 'shown_boxes\|show_gpu_info' ~/.config/btop/btop.conf
if grep -q '^show_gpu_info' ~/.config/btop/btop.conf; then
sed -i 's/^show_gpu_info = .*/show_gpu_info = "Off"/' ~/.config/btop/btop.conf
else
printf 'show_gpu_info = "Off"\n' >> ~/.config/btop/btop.conf
fi
grep -n '^show_gpu_info' ~/.config/btop/btop.conf
If a GPU box is also in shown_boxes, drop it there too (e.g. shown_boxes = "cpu mem net proc"). Everything else in the record is correct as written: the pgrep/pkill triage, the timeout-124 bisect loop, and OMARCHY_THEME_HEADLESS=1 omarchy-theme-set <name> followed by omarchy restart shell.
Verify
time omarchy theme set tokyo-night completes in a couple of seconds, and coredumpctl list btop records no new dump after switching themes with btop running.