Commit Graph
100 Commits
Author SHA1 Message Date
Ryan Hughes 5afc9e1495 Revert "Require signed packages from the Omarchy repository"
Reverts 39cffb8f, which landed on quattro through an accidental direct
push. The change returns for review as a pull request.
2026-08-24 12:53:17 -04:00
Ryan Hughes 39cffb8f51 Require signed packages from the Omarchy repository 2026-08-24 12:37:46 -04:00
Ryan HughesandGitHub 43bfe9b9d8 Merge pull request #7926 from basecamp/harden-notification-exec-argv
Run notification click actions as safe argv
2026-08-23 19:51:57 -04:00
Ryan Hughes 3b0d9b5734 Merge remote-tracking branch 'origin/quattro' into harden-notification-exec-argv
# Conflicts:
#	test/shell.d/notification-send-test.sh
2026-08-23 18:31:42 -04:00
Ryan Hughes 8f245e59dc Restore notify-send option parity and prove legacy fail-closed
The direct-Notify rewrite dropped notify-send options that callers rely on, which
the momus review caught: omarchy-display-text-size uses -r/-p to refresh one
toast in place, and the acceptance suite uses the --expire-time=15000 equals
form. Re-add -r/--replace-id (replaces_id), -p/--print-id (emit the returned id),
and the --flag=value form for every long option; a dash-leading description like
"-50% off" is now kept as body text rather than erroring, and --exec "" is
rejected.

Add a fixture proving the deliberate upgrade behavior: a popup persisted by a
pre-upgrade shell with a legacy `exec` shell string restores with an inert click
(execArgv empty, the old string never run) rather than executing it.
2026-08-23 17:18:58 -04:00
Ryan Hughes e3729a385b Send notifications via the Notify D-Bus method, never notify-send
omarchy-notification-send now calls org.freedesktop.Notifications.Notify
directly with `busctl --user`, instead of shelling out to notify-send. Each
value is one typed D-Bus parameter, so there is no argv/option layer that could
reinterpret a relayed headline like `--hint=…` or `-rf` as an option or a hint:
the summary and body are strings, and omarchy-exec-argv is built only from
--exec. A leading `--` keeps busctl's own getopt from reading a dash-leading
value as a busctl option.

Map -i to app_icon, -t to expire_timeout, and urgency to the byte hint; unknown
options are now a hard error rather than a silent pass-through. Route the unused
hypr o.notify helper and the sample hooks through the wrapper too, and tighten
the bin-style test so nothing under bin/ may call notify-send. The test stubs
busctl and trips if notify-send is invoked.
2026-08-23 17:02:29 -04:00
Ryan Hughes be63983d16 Describe parseExecArgv as a structural check, not intent
The comment claimed the validation kept a hostile hint from reaching a shell,
but it is purely structural: a well-formed ["bash","-c",…] passes. Say so,
and point at the separate sender-trust boundary.
2026-08-23 16:47:13 -04:00
Ryan Hughes 21cbbf8194 Recognize --exec only after the positionals
A greedy pre-scan matched the first --exec token anywhere on the line, so an
untrusted headline or description literally equal to "--exec" could be mistaken
for the delimiter. It always failed closed (the following token became a
dash-option argv[0] that parseExecArgv rejects), but it was a latent footgun
surfaced by an adversarial review.

Detect --exec only in the trailing-option loop, after the headline/description
positionals are captured. A headline that is the string "--exec" is now kept as
text and the real trailing --exec still wins. The residual — a description
exactly equal to "--exec" losing its click action — is an inherent, harmless CLI
ambiguity for a value identical to the delimiter.
2026-08-23 14:41:56 -04:00
Ryan Hughes bf2013e6f3 Make --exec take the command as rest-of-line words
Replace --exec-arg with an ergonomic --exec that consumes the rest of the line
as the click command. The caller's shell tokenizes the words into discrete
arguments before the tool sees them, and the shell runs them as positional
parameters (never a re-parsed string), so safety is identical to the argv form
while the call sites read naturally: `--exec omarchy toggle something`.

Crucially the tool never splits a string itself — a single quoted whole-command
argument is rejected and points at the unquoted form, because whitespace-
splitting a string hands argument boundaries to whoever controls its content
(the injection we are avoiding). --exec must come last; migrate every caller.
2026-08-23 14:26:25 -04:00
Ryan Hughes eb988b42e6 Remove --exec entirely; --exec-arg is the only click-command form
A free-form shell-string --exec sitting next to the safe --exec-arg is a
standing invitation for the next caller to interpolate untrusted data and
reintroduce the RCE. Remove it: omarchy-notification-send --exec now errors and
points at --exec-arg, and the shell drops the omarchy-exec string hint and its
bash -lc execution path, leaving only the argv path.

Migrate the remaining string callers (the first-run invitation hooks, wifi and
welcome prompts) to --exec-arg, and update their notification mocks. Trim the
verbose security comments added along the way.
2026-08-23 13:35:02 -04:00
Ryan Hughes d2fd2e11c6 Run argv click actions through a login shell as positional params
Quickshell.execDetached(argv) ran the click target with only the shell
process's stripped environment, so GUI actions like the screenshot editor
(tensaku-edit) — resolved on the login-shell PATH the old `bash -lc` string
exec provided — stopped launching on click.

Run the argv through `bash -lc 'exec "$@"'` instead: the script text is a
constant and the arguments are passed as positional parameters, which bash
expands without re-tokenizing or re-evaluating, so injection safety is intact
while PATH and session env match the old behavior exactly.
2026-08-23 12:25:48 -04:00
Ryan Hughes 07443f3970 Run notification click actions as argv, not shell strings
The click action of a notification was a free-form shell string run through
`bash -lc`, safe only when every sender shell-quoted every interpolated value
perfectly. One slip is RCE: a hostile yt-dlp video title forged an output
record and injected an mpv option into the click command (mehmetince.net RCE,
partially addressed by #7847).

Add a parameterized transport: omarchy-notification-send gains --exec-arg
(repeatable), encoding a JSON argv into the omarchy-exec-argv hint. The shell
runs it with Quickshell.execDetached(argv) and no shell, so data an attacker
controls is only ever one argument and can never be reparsed as a command. The
shell fails closed on a malformed argv hint.

The legacy free-form --exec string is retained but honored only from Omarchy's
own omarchy-action toasts, and deprecated. Migrate all in-repo callers
(screenshot, screen recording, taildrop receive, migrate-notify, crash-watch,
yt-dlp host) to --exec-arg. Update docs and tests.
2026-08-23 12:00:03 -04:00
Ryan HughesandGitHub 7be59e1f4b Merge pull request #6939 from basecamp/fix-shell-succeeds-hyprland
Fix o.shell_succeeds() always returning false inside Hyprland
2026-08-15 15:02:49 -04:00
Ryan Hughes 05bb82b34e Add checkout bin to sudoers path 2026-08-11 11:04:50 -04:00
Ryan HughesandGitHub 5844e02d2e Merge pull request #6459 from basecamp/agents-md-corrections
Correct three AGENTS.md claims against the repo
2026-07-31 13:10:06 -04:00
Ryan HughesandGitHub 00376ec43c Merge pull request #6422 from OldJobobo/fix/quickshell-asymmetric-border-corners
Fix asymmetric rounded shell borders
2026-07-29 12:44:48 -04:00
Ryan Hughes 38c1352f6d Fix t2 module 2026-07-28 21:07:50 -04:00
Ryan Hughes 2fb33a2a6a Prevent showing disconnected icon when connected on another device 2026-07-27 11:29:03 -04:00
Ryan Hughes 88ef6ca597 Unnecessary
Sets reboot, changes take effect on reboot anyway
2026-07-27 09:49:13 -04:00
Ryan Hughes 72dfbb43cd Additional zram + swap tuning 2026-07-27 09:48:20 -04:00
Ryan Hughes c048b2c745 Normalize Snapper snapshot setup 2026-06-21 02:25:42 -04:00
Ryan Hughes 34ddf5d54e Fix NetworkManager transition during upgrade 2026-06-21 02:25:42 -04:00
Ryan Hughes 2b95eddfa6 Fix remote copy / paste for nvim 2026-06-20 15:44:37 -04:00
Ryan Hughes d63fdd2a23 Avoid transient Hyprland binding module errors 2026-06-16 01:27:43 -04:00
Ryan Hughes 2fdc6f0573 Move stock Hyprland bindings into defaults 2026-06-16 01:25:04 -04:00
Ryan Hughes fd5063dc30 Fix notification popup placement 2026-06-16 01:25:04 -04:00
Ryan Hughes 2a7602a084 Complete upgrade-to-4 update flow 2026-06-15 11:27:54 -04:00
Ryan Hughes 227240d280 Collapse inactive indicator spacing 2026-06-14 21:12:42 -04:00
Ryan Hughes 8d490d525e Select Codex icon by surface background 2026-06-14 20:14:09 -04:00
Ryan Hughes e0eaf8eea8 Use light Codex icon on light themes 2026-06-14 20:09:29 -04:00
Ryan Hughes d8cff94711 Fix model usage layout on vertical bar 2026-06-14 17:40:00 -04:00
Ryan Hughes 4bfa5a6949 Switch default editor to tensaku so we can move things 2026-06-12 22:27:20 -04:00
Ryan Hughes c582e7133a Unify Omarchy migrations 2026-06-12 13:49:46 -04:00
Ryan Hughes 04b0fab64d Remove old test repo 2026-06-12 02:16:01 -04:00
Ryan Hughes fec52e53d2 Cleanup hyprland conf 2026-06-12 02:15:51 -04:00
Ryan Hughes b1e585fec5 Fix nvim theme location 2026-06-12 02:15:22 -04:00
Ryan Hughes 221fb296fc Simplify theme palette tokens 2026-06-11 02:08:02 -04:00
Ryan Hughes 4b2a15b6ea Avoid polkit prompts from shell network status 2026-06-10 13:10:03 -04:00
Ryan Hughes cd0b78cd0f Restore lock surface after shell restart 2026-06-10 12:17:35 -04:00
Ryan Hughes 15614cd4d3 Rename live dev channel to edge 2026-06-10 11:18:36 -04:00
Ryan Hughes c1b9788506 Fix channels 2026-06-09 23:55:58 -04:00
Ryan Hughes 0f5e81143e Move current theme state to local state 2026-06-09 19:48:37 -04:00
Ryan Hughes 29c4a20a86 Fix Claude weekly usage display 2026-06-09 18:11:47 -04:00
Ryan Hughes 7d30407a23 Namespace Discord icon 2026-06-09 15:21:52 -04:00
Ryan Hughes bce9fef4e3 Streamline Hyprland reload guard 2026-06-09 15:13:23 -04:00
Ryan Hughes f79a231cc7 Pause Hyprland reloads during settings updates 2026-06-09 14:20:36 -04:00
Ryan Hughes 9b8c9fd537 Update Omarchy channel switcher 2026-06-09 13:05:30 -04:00
Ryan Hughes 22a42e073a Infer edge channel on --dev 2026-06-09 10:22:55 -04:00
Ryan Hughes 64581ec289 Remove hot link / unlink bits 2026-06-08 12:03:40 -04:00
Ryan Hughes 17f024d481 Make dev unlink reset Omarchy path defensively 2026-06-07 16:35:54 -04:00
Ryan Hughes 5178405d19 Merge remote-tracking branch 'origin/omarchy-shell' into omarchy-4 2026-06-07 14:56:08 -04:00
Ryan Hughes 8baae47d48 Fix wifi frequency displays 2026-06-07 14:55:21 -04:00
Ryan Hughes 132e67bf4c Default pkg-test to dev packages 2026-06-06 20:36:21 -04:00
Ryan Hughes fc6feedae5 Load Omarchy fontconfig after generic aliases 2026-06-06 19:31:51 -04:00
Ryan Hughes d2c1544d78 Fix sleep lock service during Omarchy 4 upgrade 2026-06-06 19:31:51 -04:00
Ryan Hughes 4c17f6a675 Merge remote-tracking branch 'origin/omarchy-shell' into omarchy-4
# Conflicts:
#	bin/omarchy-debug
#	bin/omarchy-upload-log
2026-06-06 13:28:47 -04:00
Ryan Hughes 92246a50fb Enable plugin hot reloading for add / remove 2026-06-06 13:25:54 -04:00
Ryan Hughes 42bdf374dd Use Omarchy log upload endpoint 2026-06-06 13:25:54 -04:00
Ryan Hughes 2c44fdf5f3 Merge remote-tracking branch 'origin/omarchy-shell' into omarchy-4 2026-06-05 18:35:34 -04:00
Ryan Hughes 1409f85745 Make the bar more easily swapable 2026-06-05 16:49:30 -04:00
Ryan Hughes e5516d882d Simplify system update popover 2026-06-04 19:23:54 -04:00
Ryan Hughes 92de15214c Reconcile omarchy-shell rebase 2026-06-04 18:40:57 -04:00
Ryan Hughes cb3fc79385 Add dev package mode to Omarchy 4 upgrade 2026-06-04 18:38:25 -04:00
Ryan Hughes ddd7e058a2 Auto-mount removable drives by default with udiskie 2026-06-04 18:38:25 -04:00
Ryan Hughes 23f8418ed6 Move boot drop-ins into Omarchy repo 2026-06-04 18:38:25 -04:00
Ryan Hughes 20d79fe443 Improve update widget 2026-06-04 18:38:25 -04:00
Ryan Hughes d0cac7346a Finish v4 upgrade cleanup 2026-06-04 18:38:25 -04:00
Ryan Hughes 0804962619 Improve update and migration flow 2026-06-04 18:38:25 -04:00
Ryan Hughes c8ed1e77ae Fix Chromium copy URL extension path on v4 upgrade 2026-06-04 18:38:25 -04:00
Ryan Hughes 3f5b92b413 upgrade-to-4: inject [omarchy-dev] above [omarchy] in pacman.conf
TEMPORARY: while the omarchy-4 stack is being iterated, the production
edge/stable/rc channels at pkgs.omarchy.org/<ring>/x86_64 don't have the
new omarchy and omarchy-settings packages — only omarchy-keyring and
omarchy-nvim are published. The work-in-progress packages live in the
dev repo at share.heyoodle.com/omarchy/dev/<arch> via
omarchy-pkgs/bin/publish-dev-repo.

To stop hand-editing pacman.conf after every run of this script,
configure_pacman_channel() now emits a [omarchy-dev] block right above
[omarchy] with SigLevel = Never and the share.heyoodle URL. Pacman
honors repo declaration order, so dev packages take precedence when
both ring publish them.

The awk also dedupes any pre-existing [omarchy-dev] block (so rerunning
the script doesn't pile up duplicate entries) and falls back to
appending both blocks at the end if no [omarchy] section was present.

Revert this block once the production rings have caught up.
2026-06-04 18:38:25 -04:00
Ryan Hughes 6f73eb5d9d upgrade-to-4: drop omarchy-limine from core_packages install list
omarchy-limine no longer exists as a separate package — it was folded
into omarchy-settings (configs) and omarchy (bootloader stack hard dep).
Listing it in install_omarchy_4_packages's pacman -Syu invocation
produced 'error: target not found: omarchy-limine' on every run.

Also fix the now-stale 'shipped by omarchy-settings / omarchy-limine'
comment in the retire-action header (line 1119) — the files come from
omarchy-settings alone now.

The bootloader stack (limine, limine-mkinitcpio-hook, limine-snapper-sync,
snapper) is hard-depended by the omarchy package, so dropping
omarchy-limine from the explicit list doesn't change what gets installed
on a real upgrade.
2026-06-04 18:38:25 -04:00
Ryan Hughes 4e10d41f0e Start user units immediately in first-run, not just enable
systemctl --user enable only writes the .wants symlinks; the services
don't actually run until next login. Switching to --now enables AND
starts them, so the first session has bt-agent (bluetooth pairing) and
omarchy-sleep-lock active immediately rather than waiting a reboot.

omarchy-recover-internal-monitor is Type=oneshot with a
ConditionPathExists guard, so --now is harmless for it (it'll skip if
the toggle isn't set).
2026-06-04 18:38:25 -04:00
Ryan Hughes aa12358201 Update file layout for the two-package architecture
Reflects the two upstream changes in this work:
- omarchy-dev-tools folds into omarchy (bin/omarchy-dev-* ship with the
  main package).
- omarchy-limine folds into omarchy-settings (limine + snapper configs,
  mkinitcpio hooks, and the default/{limine,snapper}/ trees ship from
  omarchy-settings; the package was always installed in lockstep with
  it in the early bootstrap anyway).

Mental-model section: from four packages to two (omarchy +
omarchy-settings), plus the two unchanged independents (omarchy-keyring,
omarchy-nvim).

Build-time map: drop the omarchy-dev-tools and omarchy-limine columns;
add the new limine source files (omarchy_hooks.conf,
thunderbolt_module.conf, omarchy-defaults.conf, omarchy-uki.conf) under
omarchy-settings.
2026-06-04 18:38:25 -04:00
Ryan Hughes 041f280f68 Document env-bootstrap and first-run in file layout
- Add default/bash/env-bootstrap to the build-time map and a dedicated
  section describing what it sets, who sources it, and the dev-link gate
  on the PATH prepend.
- Drop 'bluetooth' from the install/user/all.sh hardware-quirks list
  (the per-hardware install script is gone now that the wireplumber
  config ships through /etc/skel and bt-agent enables at first-run).
- Add a first-run section listing the post-login steps, including the
  new enable-user-units.sh that defers user systemctl enables.
2026-06-04 18:38:25 -04:00
Ryan Hughes babfafa5e9 Split user defaults into skel seed, finalize, and resync
Reorganizes Omarchy 4 around three layers for populating $HOME:

  Seed:     omarchy-settings ships defaults to /etc/skel; useradd -m
            copies them on user creation
  Finalize: omarchy-finalize-user (renamed from omarchy-setup-user)
            handles only the runtime tweaks /etc/skel can't do — skill
            symlinks, xdg-user-dirs, default browser/mailto, vconsole→hypr
            keyboard sync, and install/user/all.sh
  Resync:   omarchy-reinstall-configs is the explicit, destructive
            resync of /etc/skel into an existing user's $HOME

Package-owned files move out of config/ into default/, where the
omarchy-settings PKGBUILD installs them to real system paths:

  config/environment.d/fcitx.conf            -> /usr/lib/environment.d/
  config/fontconfig/fonts.conf               -> /usr/share/fontconfig/conf.avail/
  config/mimeapps.list                       -> /usr/share/applications/
  config/omarchy.ttf                         -> /usr/share/fonts/omarchy/
  config/systemd/user/*.service              -> /usr/lib/systemd/user/
  config/uwsm/default                        -> /usr/share/omarchy/default/uwsm/
  config/uwsm/env                            -> /usr/share/uwsm/env.d/10-omarchy
  config/xdg-terminals.list                  -> /usr/share/xdg-terminal-exec/

omarchy-upgrade-to-4 grows a 'retire' action (renamed from 'move' to
clarify nothing is copied — the system path is owned by the new package
once the user's hash-matched ~/.config copy is removed). Mismatched
copies are kept as backups so user overrides survive the upgrade.

Other simplifications:

  - Single env bootstrap at default/bash/env-bootstrap sourced by
    /etc/profile.d/omarchy.sh, /etc/skel/.bashrc,
    /usr/share/uwsm/env.d/10-omarchy, and default/bash/envs. PATH
    prepend only in dev-link mode (production uses /usr/bin/omarchy-*).
  - omarchy-refresh-config reads from /etc/skel/.config so refresh
    means 'snap to skel'.
  - omarchy-reinstall-configs collapses to 'cp -af /etc/skel/. ~/'
    plus limine/plymouth/nvim refresh.
  - omarchy-font-set uses awk against our own 30-omarchy.conf instead
    of xmlstarlet; xmlstarlet dropped from omarchy-base.packages.
  - Defer user systemd enables (bt-agent, sleep-lock,
    recover-internal-monitor) to first-run via
    install/user/first-run/enable-user-units.sh; delete
    omarchy-user-systemctl-enable and the per-hardware install
    scripts that called it.
  - Wireplumber bluetooth-a2dp-autoconnect.conf moves to config/ so
    /etc/skel ships it; install/user/hardware/bluetooth.sh deleted.
  - Default terminal switched to foot.desktop.
  - docs/file-layout.md documents the three-layer model and the
    build-time repo→path map.
2026-06-04 18:38:25 -04:00
Ryan Hughes 85da6af886 Make retired package cleanup dependency-aware 2026-06-04 18:38:25 -04:00
Ryan Hughes 5214bfd1ad Harden Omarchy 4 live upgrade cutover 2026-06-04 18:38:25 -04:00
Ryan Hughes f1bdec3e67 add cleanup 2026-06-04 18:38:25 -04:00
Ryan Hughes e707ca116f Remove retired upgrade packages together 2026-06-04 18:38:25 -04:00
Ryan Hughes 85bf7f108d Harden Omarchy 4 upgrade and first-run retry 2026-06-04 18:38:25 -04:00
Ryan Hughes 06db866467 Prepare installer for ISO-owned finalization 2026-06-04 18:38:25 -04:00
Ryan Hughes bcf07e424a Add Omarchy 4 upgrade bridge
Introduce a self-contained omarchy-upgrade-to-4 command for legacy installs and remove the 4.0 package-layout transition from the normal migration runner.
2026-06-04 18:37:32 -04:00
Ryan Hughes 75cb4f7195 Make setup ISO-only
Remove legacy online installer entrypoints, collapse migrations for 4.0, and move setup responsibilities into target-side system, hardware, and user commands.
2026-06-04 18:37:32 -04:00
Ryan Hughes b45e8464ef Move NVIDIA env setup to Hyprland Lua
Evaluate NVIDIA session env vars from default/hypr/nvidia.lua during Hyprland startup instead of appending them to each user's envs.lua during setup. This removes the per-user NVIDIA setup script execution while preserving the GSP/non-GSP detection.
2026-06-04 18:35:01 -04:00
Ryan Hughes 27f6d9d364 migrations: keep system helpers sudo-compatible 2026-06-04 18:35:01 -04:00
Ryan Hughes bf14f69017 installer: require target user for system finalizer 2026-06-04 18:35:01 -04:00
Ryan Hughes 67c401c125 docs: refresh SDDM crosswalk 2026-06-04 18:35:01 -04:00
Ryan Hughes 487fcb8038 install: rely on packaged SDDM assets 2026-06-04 18:35:01 -04:00
Ryan Hughes 844278ad19 docs: add installer review crosswalk 2026-06-04 18:35:01 -04:00
Ryan Hughes acdb1d1b57 install: split SDDM static config from autologin 2026-06-04 18:35:01 -04:00
Ryan Hughes d12d449b03 install: split and harden hardware config scripts 2026-06-04 18:35:01 -04:00
Ryan Hughes 6056f8800c install: drop helpers replaced by package-owned config 2026-06-04 18:35:01 -04:00
Ryan Hughes f451b504eb install: route theme setup through split scripts 2026-06-04 18:35:01 -04:00
Ryan Hughes e393a3a836 install: centralize service enablement 2026-06-04 18:35:01 -04:00
Ryan Hughes 7ef5bc56fd install: make system scripts root-finalizer aware 2026-06-04 18:35:01 -04:00
Ryan Hughes 0cfa1b66c4 installer: route install through system and user phases 2026-06-04 18:35:01 -04:00
Ryan Hughes 53e2611507 install: add split system and user targets 2026-06-04 18:35:01 -04:00
Ryan Hughes b29747a54b installer: reduce offline finalizer work 2026-06-04 18:35:01 -04:00
Ryan Hughes 724f46f145 installer: trace finalizer in debug builds 2026-06-04 18:35:01 -04:00
Ryan Hughes b5ed8cad4d installer: slim finalizer bootstrap 2026-06-04 18:35:01 -04:00