From 75cb4f7195cfc064d05cd30623b3254c9541ba3c Mon Sep 17 00:00:00 2001 From: Ryan Hughes Date: Mon, 25 May 2026 12:50:31 -0400 Subject: [PATCH] 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. --- AGENTS.md | 29 +-- REVIEW-CROSSWALK.md | 95 --------- applications/Basecamp.desktop | 8 + applications/ChatGPT.desktop | 8 + applications/Discord.desktop | 8 + applications/Disk Usage.desktop | 8 + applications/Docker.desktop | 8 + applications/Figma.desktop | 8 + applications/Fizzy.desktop | 8 + applications/GitHub.desktop | 8 + applications/Google Contacts.desktop | 8 + applications/Google Maps.desktop | 8 + applications/Google Messages.desktop | 8 + applications/Google Photos.desktop | 8 + applications/HEY.desktop | 9 + applications/WhatsApp.desktop | 8 + applications/X.desktop | 8 + applications/YouTube.desktop | 8 + applications/Zoom.desktop | 9 + applications/battlenet.desktop | 2 +- bin/omarchy-branch-set | 18 -- bin/omarchy-channel-set | 15 +- bin/omarchy-debug | 2 +- bin/omarchy-dev-add-migration | 17 +- bin/omarchy-dev-link | 2 +- bin/omarchy-dev-pkg-test | 2 +- bin/omarchy-first-run | 38 +--- bin/omarchy-games-retro-install | 8 +- bin/omarchy-hibernation-setup | 3 - bin/omarchy-install | 11 - bin/omarchy-install-gaming-battlenet | 5 +- bin/omarchy-install-mode | 8 - bin/omarchy-install-service-sunshine | 6 +- bin/omarchy-migrate | 25 +-- bin/omarchy-refresh-applications | 14 +- bin/omarchy-reinstall | 7 +- bin/omarchy-reinstall-configs | 20 +- bin/omarchy-reinstall-git | 11 - bin/omarchy-remove-gaming-battlenet | 2 - bin/omarchy-setup-hardware | 62 ++++++ bin/omarchy-setup-system | 94 +++++++++ bin/omarchy-setup-user | 115 +++++++---- bin/omarchy-system-sleep-monitor | 11 +- bin/omarchy-theme-set | 10 +- bin/omarchy-tui-install | 60 ++++-- bin/omarchy-tui-remove | 6 +- bin/omarchy-tui-remove-all | 6 +- bin/omarchy-update | 5 +- bin/omarchy-update-available | 27 +-- bin/omarchy-update-branch | 36 ---- bin/omarchy-update-git | 18 -- bin/omarchy-version-branch | 5 - bin/omarchy-webapp-install | 60 ++++-- bin/omarchy-webapp-remove | 6 +- bin/omarchy-webapp-remove-all | 6 +- bin/omarchy-windows-vm | 9 +- boot.sh | 53 ----- config/fastfetch/config.jsonc | 6 - config/mimeapps.list | 5 +- .../systemd/user/omarchy-sleep-lock.service | 2 +- config/uwsm/env | 7 +- default/bash/envs | 4 +- default/limine/default.conf | 17 -- default/omarchy-skill/SKILL.md | 24 +-- finalize.sh | 64 ------ install.sh | 54 ----- install/config/all.sh | 51 +---- install/config/enable-services.sh | 1 - install/config/firewall.sh | 19 ++ install/config/sleep-lock.sh | 3 - install/config/theme-system.sh | 1 + install/config/theme-user.sh | 17 -- install/config/user.sh | 9 - install/first-run/cleanup-reboot-sudoers.sh | 1 - install/first-run/dns-resolver.sh | 4 - install/first-run/firewall.sh | 21 -- install/first-run/gnome-theme-system.sh | 1 - install/hardware/all.sh | 41 ++++ .../hardware/apple/fix-spi-keyboard.sh | 0 .../hardware/apple/fix-suspend-nvme.sh | 0 install/{config => }/hardware/apple/fix-t2.sh | 0 install/{packaging => hardware}/asus-rog.sh | 0 .../asus/fix-asus-ptl-b9406-display.sh | 0 .../asus/fix-asus-ptl-b9406-touchpad.sh | 0 .../asus/fix-asus-ptl-display-backlight.sh | 0 .../hardware/asus/fix-z13-touchpad.sh | 0 install/{config => }/hardware/bluetooth.sh | 2 + .../dell-xps-touchpad-haptics.sh | 0 install/{config => }/hardware/fix-bcm43xx.sh | 0 install/{config => }/hardware/fix-fkeys.sh | 0 .../hardware/fix-surface-keyboard.sh | 0 .../hardware/fix-synaptic-touchpad.sh | 0 .../hardware/fix-tuxedo-backlight.sh | 0 .../hardware/fix-yt6801-ethernet-adapter.sh | 0 .../hardware/framework/qmk-hid.sh | 0 .../{packaging => hardware}/framework16.sh | 0 install/{config => hardware}/input-group.sh | 0 .../hardware/intel/fix-wifi7-eht.sh | 0 install/{config => }/hardware/intel/fred.sh | 5 - .../hardware/intel/ipu7-camera.sh | 0 install/{config => }/hardware/intel/lpmd.sh | 0 .../{config => }/hardware/intel/ptl-kernel.sh | 0 .../hardware/intel/sof-firmware.sh | 0 .../{config => }/hardware/intel/thermald.sh | 0 .../hardware/intel/video-acceleration.sh | 0 .../lenovo/fix-yoga-pro7-bass-speakers.sh | 0 install/{config => }/hardware/network.sh | 0 install/{config => }/hardware/nvidia.sh | 0 install/hardware/pacman.sh | 12 ++ .../hardware/set-wireless-regdom.sh | 0 install/{packaging => hardware}/surface.sh | 0 install/{config => }/hardware/vulkan.sh | 0 install/helpers/all.sh | 5 - install/helpers/errors.sh | 179 ---------------- install/helpers/logging.sh | 140 ++----------- install/helpers/mode.sh | 51 ----- install/helpers/presentation.sh | 48 ----- install/login/all.sh | 1 - install/login/hibernation.sh | 4 - install/login/limine-snapper.sh | 172 ---------------- install/login/sddm.sh | 20 +- install/login/system.sh | 6 +- install/omarchy-base.packages | 4 +- install/packaging/all.sh | 2 - install/packaging/base.sh | 3 - install/packaging/icons.sh | 4 - install/packaging/nvim.sh | 2 - install/packaging/system.sh | 4 - install/packaging/tuis.sh | 4 - install/packaging/user.sh | 1 - install/packaging/webapps.sh | 15 -- install/post-install/all.sh | 2 - install/post-install/allow-reboot.sh | 11 - install/post-install/dns-resolver.sh | 5 + install/post-install/finished.sh | 44 ---- install/post-install/first-run-mode.sh | 18 -- install/post-install/legacy-cleanup.sh | 5 - install/post-install/pacman.sh | 9 +- install/post-install/system.sh | 12 +- install/preflight/all.sh | 12 -- install/preflight/begin.sh | 4 - install/preflight/disable-mkinitcpio.sh | 16 -- install/preflight/first-run-mode.sh | 16 -- install/preflight/guard.sh | 49 ----- install/preflight/migrations.sh | 6 - install/preflight/show-env.sh | 6 - install/system/all.sh | 6 - install/user/all.sh | 16 +- install/{login => user}/default-keyring.sh | 0 .../first-run/gnome-theme.sh} | 0 .../{ => user}/first-run/gtk-primary-paste.sh | 0 .../{ => user}/first-run/install-voxtype.hook | 0 install/{ => user}/first-run/welcome.sh | 0 install/{ => user}/first-run/wifi.sh | 0 install/{config => user}/git.sh | 0 .../hardware/asus/fix-audio-mixer.sh | 0 .../{config => user}/hardware/asus/fix-mic.sh | 0 .../hardware/bluetooth.sh} | 6 +- .../framework/fix-f13-amd-audio-input.sh | 0 .../hardware}/recover-internal-monitor.sh | 0 install/{config => user}/mise-work.sh | 12 +- install/{packaging => user}/mise.sh | 0 install/user/sleep-lock.sh | 7 + install/user/theme.sh | 14 ++ install/{config => user}/xcompose.sh | 0 migrations/1751134560.sh | 28 --- migrations/1751134562.sh | 5 - migrations/1751134563.sh | 3 - migrations/1751134564.sh | 3 - migrations/1751134568.sh | 8 - migrations/1751135253.sh | 3 - migrations/1751510848.sh | 3 - migrations/1751667620.sh | 22 -- migrations/1751669258.sh | 5 - migrations/1751672984.sh | 4 - migrations/1751679069.sh | 3 - migrations/1751821819.sh | 3 - migrations/1752081088.sh | 3 - migrations/1752082381.sh | 3 - migrations/1752091783.sh | 4 - migrations/1752104271.sh | 9 - migrations/1752188554.sh | 5 - migrations/1752292967.sh | 19 -- migrations/1752535084.sh | 7 - migrations/1752535341.sh | 9 - migrations/1752543801.sh | 4 - migrations/1752643269.sh | 5 - migrations/1752678932.sh | 3 - migrations/1752725616.sh | 14 -- migrations/1752797704.sh | 18 -- migrations/1752874371.sh | 5 - migrations/1752896442.sh | 6 - migrations/1752897642.sh | 3 - migrations/1752955912.sh | 3 - migrations/1753495989.sh | 5 - migrations/1753689791.sh | 5 - migrations/1753908454.sh | 12 -- migrations/1754047941.sh | 9 - migrations/1754109724.sh | 6 - migrations/1754215533.sh | 17 -- migrations/1754221967.sh | 3 - migrations/1754332200.sh | 3 - migrations/1754509222.sh | 3 - migrations/1754514972.sh | 3 - migrations/1754566681.sh | 7 - migrations/1754668999.sh | 3 - migrations/1754856741.sh | 5 - migrations/1754860578.sh | 27 --- migrations/1754984734.sh | 23 --- migrations/1754996869.sh | 3 - migrations/1755109182.sh | 31 --- migrations/1755139080.sh | 9 - migrations/1755208929.sh | 4 - migrations/1755436367.sh | 6 - migrations/1755455095.sh | 3 - migrations/1755459930.sh | 3 - migrations/1755494432.sh | 3 - migrations/1755507891.sh | 14 -- migrations/1755795450.sh | 3 - migrations/1755865046.sh | 4 - migrations/1755867743.sh | 4 - migrations/1755904244.sh | 6 - migrations/1755920552.sh | 3 - migrations/1755930114.sh | 5 - migrations/1756060611.sh | 19 -- migrations/1756115364.sh | 6 - migrations/1756203383.sh | 4 - migrations/1756205202.sh | 7 - migrations/1756300740.sh | 3 - migrations/1756360552.sh | 4 - migrations/1756410649.sh | 7 - migrations/1756411333.sh | 3 - migrations/1756411865.sh | 3 - migrations/1756491748.sh | 6 - migrations/1756494998.sh | 5 - migrations/1756507384.sh | 4 - migrations/1756556731.sh | 3 - migrations/1756629295.sh | 3 - migrations/1756642681.sh | 3 - migrations/1756650507.sh | 5 - migrations/1756911131.sh | 11 - migrations/1757021485.sh | 3 - migrations/1757147211.sh | 7 - migrations/1757361127.sh | 8 - migrations/1757361128.sh | 7 - migrations/1757435811.sh | 3 - migrations/1757435812.sh | 6 - migrations/1757483378.sh | 4 - migrations/1757535736.sh | 9 - migrations/1757783204.sh | 9 - migrations/1757879836.sh | 5 - migrations/1758019332.sh | 6 - migrations/1758051607.sh | 11 - migrations/1758104201.sh | 3 - migrations/1758111304.sh | 3 - migrations/1758142943.sh | 21 -- migrations/1758436991.sh | 16 -- migrations/1758455816.sh | 13 -- migrations/1758487660_change_dm_to_sddm.sh | 55 ----- migrations/1758487662_move_to_custom_uki.sh | 38 ---- migrations/1758562032.sh | 5 - migrations/1758734243.sh | 3 - migrations/1759355846.sh | 21 -- migrations/1759691413.sh | 5 - migrations/1759895423.sh | 10 - migrations/1759913695.sh | 3 - migrations/1760144906.sh | 5 - migrations/1760301290.sh | 5 - migrations/1760304963.sh | 9 - migrations/1760434895.sh | 6 - migrations/1760441237.sh | 3 - migrations/1760471009.sh | 5 - migrations/1760684828.sh | 3 - migrations/1760724934.sh | 23 --- migrations/1760730253.sh | 3 - migrations/1761180745.sh | 7 - migrations/1761241493.sh | 33 --- migrations/1761247569.sh | 2 - migrations/1761274806.sh | 5 - migrations/1761274980.sh | 11 - migrations/1761585764.sh | 3 - migrations/1761638377.sh | 6 - migrations/1761758552.sh | 21 -- migrations/1761897226.sh | 4 - migrations/1762121828.sh | 36 ---- migrations/1762156000.sh | 3 - migrations/1762417304.sh | 3 - migrations/1762446739.sh | 12 -- migrations/1762711005.sh | 3 - migrations/1762768186.sh | 3 - migrations/1762770442.sh | 5 - migrations/1762770815.sh | 3 - migrations/1762781907.sh | 4 - migrations/1763409182.sh | 3 - migrations/1763478660.sh | 4 - migrations/1763558828.sh | 28 --- migrations/1763561396.sh | 3 - migrations/1763583093.sh | 6 - migrations/1763626772.sh | 6 - migrations/1763633307.sh | 5 - migrations/1763753641.sh | 3 - migrations/1764067963.sh | 4 - migrations/1764272475.sh | 2 - migrations/1764333665.sh | 3 - migrations/1765587218.sh | 17 -- migrations/1765744321.sh | 2 - migrations/1765846739.sh | 3 - migrations/1765884267.sh | 6 - migrations/1766942230.sh | 19 -- migrations/1767306902.sh | 65 ------ migrations/1767478687.sh | 9 - migrations/1767865784.sh | 3 - migrations/1768236764.sh | 4 - migrations/1768906440.sh | 19 -- migrations/1768916735.sh | 8 - migrations/1769183359.sh | 3 - migrations/1769510847.sh | 10 - migrations/1769616857.sh | 3 - migrations/1769619823.sh | 3 - migrations/1770393078.sh | 7 - migrations/1770483021.sh | 4 - migrations/1770638893.sh | 9 - migrations/1771002522.sh | 11 - migrations/1771188969.sh | 14 -- migrations/1771345870.sh | 6 - migrations/1771403119.sh | 3 - migrations/1771615907.sh | 3 - migrations/1771667323.sh | 7 - migrations/1771670389.sh | 7 - migrations/1771682500.sh | 12 -- migrations/1771683296.sh | 13 -- migrations/1772051864.sh | 5 - migrations/1772211023.sh | 3 - migrations/1772294096.sh | 21 -- migrations/1772379119.sh | 13 -- migrations/1772389838.sh | 67 ------ migrations/1772632144.sh | 7 - migrations/1772907198.sh | 11 - migrations/1772964511.sh | 3 - migrations/1772981555.sh | 7 - migrations/1772981757.sh | 5 - migrations/1772988614.sh | 7 - migrations/1772990935.sh | 7 - migrations/1773012889.sh | 4 - migrations/1773505447.sh | 3 - migrations/1773506226.sh | 15 -- migrations/1773599943.sh | 8 - migrations/1774366575.sh | 3 - migrations/1774401148.sh | 6 - migrations/1774642699.sh | 7 - migrations/1775059710.sh | 11 - migrations/1775241210.sh | 15 -- migrations/1775546086.sh | 5 - migrations/1775691486.sh | 6 - migrations/1775954402.sh | 11 - migrations/1776246235.sh | 17 -- migrations/1776346552.sh | 12 -- migrations/1776434586.sh | 22 -- migrations/1776611242.sh | 4 - migrations/1776615976.sh | 3 - migrations/1776617403.sh | 14 -- migrations/1776781956.sh | 19 -- migrations/1776784497.sh | 5 - migrations/1776927490.sh | 50 ----- migrations/1776935686.sh | 9 - migrations/1777018408.sh | 9 - migrations/1777072987.sh | 7 - migrations/1777145626.sh | 3 - migrations/1777282771.sh | 5 - migrations/1777396666.sh | 8 - migrations/1777450869.sh | 9 - migrations/1777546300.sh | 9 - migrations/1777570652.sh | 10 - migrations/1777572869.sh | 16 -- migrations/1777618046.sh | 5 - migrations/1777653181.sh | 14 -- migrations/1777800806.sh | 20 -- migrations/1777909712.sh | 10 - migrations/1777929468.sh | 5 - migrations/1777938402.sh | 15 -- migrations/1778001804.sh | 3 - migrations/1778026496.sh | 11 - migrations/1778052575.sh | 7 - migrations/1778079164.sh | 7 - migrations/1778099894.sh | 3 - migrations/1778148645.sh | 12 -- migrations/1778165347.sh | 5 - migrations/1778222128.sh | 7 - migrations/1778233760.sh | 3 - migrations/1778270869.sh | 20 -- migrations/1778291336.sh | 3 - migrations/1778307905.sh | 4 - migrations/1778321093.sh | 92 --------- migrations/1778346208.sh | 11 - migrations/1778388568.sh | 3 - migrations/1778506941.sh | 3 - migrations/1778510426.sh | 15 -- migrations/1778743515.sh | 24 --- migrations/1778752973.sh | 26 --- migrations/1778847256.sh | 3 - migrations/1778847558.sh | 3 - migrations/1778851263.sh | 11 - migrations/1778956449.sh | 13 -- migrations/1779047753.sh | 8 - migrations/1779107651.sh | 7 - migrations/1779137438.sh | 3 - migrations/1779171487.sh | 3 - migrations/1779180647.sh | 11 - migrations/1779182943.sh | 10 - migrations/1779184948.sh | 9 - migrations/1779203294.sh | 12 -- migrations/1779210892.sh | 32 --- migrations/1779216860.sh | 7 - migrations/1779218170.sh | 5 - migrations/1779219192.sh | 23 --- migrations/1779232736.sh | 20 -- migrations/1779242346.sh | 5 - migrations/1779259320.sh | 3 - migrations/1779277899.sh | 26 --- migrations/1779283409.sh | 70 ------- migrations/1779286136.sh | 90 -------- migrations/1779287628.sh | 46 ----- migrations/1779297337.sh | 5 - migrations/1779303581.sh | 35 ---- migrations/1779307210.sh | 6 - migrations/1779309700.sh | 3 - migrations/1779330555.sh | 8 - migrations/1779350210.sh | 12 -- migrations/1779357523.sh | 75 ------- migrations/1779449206.sh | 11 - migrations/1779481017.sh | 41 ---- migrations/1779627463.sh | 42 ---- migrations/1779696759.sh | 50 ----- migrations/1779715013.sh | 6 - migrations/1780000000_4_0.sh | 24 +++ system-finalize.sh | 36 ---- test/cli | 3 - test/offline-finalizer-bootstrap-test.sh | 179 ---------------- test/shell.d/config-test.sh | 192 +----------------- test/shell.d/runtime-smoke-test.sh | 1 + 440 files changed, 790 insertions(+), 4922 deletions(-) delete mode 100644 REVIEW-CROSSWALK.md create mode 100644 applications/Basecamp.desktop create mode 100644 applications/ChatGPT.desktop create mode 100644 applications/Discord.desktop create mode 100644 applications/Disk Usage.desktop create mode 100644 applications/Docker.desktop create mode 100644 applications/Figma.desktop create mode 100644 applications/Fizzy.desktop create mode 100644 applications/GitHub.desktop create mode 100644 applications/Google Contacts.desktop create mode 100644 applications/Google Maps.desktop create mode 100644 applications/Google Messages.desktop create mode 100644 applications/Google Photos.desktop create mode 100644 applications/HEY.desktop create mode 100644 applications/WhatsApp.desktop create mode 100644 applications/X.desktop create mode 100644 applications/YouTube.desktop create mode 100644 applications/Zoom.desktop delete mode 100755 bin/omarchy-branch-set delete mode 100755 bin/omarchy-install delete mode 100755 bin/omarchy-install-mode delete mode 100755 bin/omarchy-reinstall-git create mode 100755 bin/omarchy-setup-hardware create mode 100755 bin/omarchy-setup-system delete mode 100755 bin/omarchy-update-branch delete mode 100755 bin/omarchy-update-git delete mode 100755 bin/omarchy-version-branch delete mode 100755 boot.sh delete mode 100644 finalize.sh delete mode 100644 install.sh create mode 100644 install/config/firewall.sh delete mode 100644 install/config/sleep-lock.sh delete mode 100644 install/config/theme-user.sh delete mode 100644 install/config/user.sh delete mode 100644 install/first-run/cleanup-reboot-sudoers.sh delete mode 100644 install/first-run/dns-resolver.sh delete mode 100644 install/first-run/firewall.sh delete mode 100644 install/first-run/gnome-theme-system.sh create mode 100644 install/hardware/all.sh rename install/{config => }/hardware/apple/fix-spi-keyboard.sh (100%) rename install/{config => }/hardware/apple/fix-suspend-nvme.sh (100%) rename install/{config => }/hardware/apple/fix-t2.sh (100%) rename install/{packaging => hardware}/asus-rog.sh (100%) rename install/{config => }/hardware/asus/fix-asus-ptl-b9406-display.sh (100%) rename install/{config => }/hardware/asus/fix-asus-ptl-b9406-touchpad.sh (100%) rename install/{config => }/hardware/asus/fix-asus-ptl-display-backlight.sh (100%) rename install/{config => }/hardware/asus/fix-z13-touchpad.sh (100%) rename install/{config => }/hardware/bluetooth.sh (84%) rename install/{packaging => hardware}/dell-xps-touchpad-haptics.sh (100%) rename install/{config => }/hardware/fix-bcm43xx.sh (100%) rename install/{config => }/hardware/fix-fkeys.sh (100%) rename install/{config => }/hardware/fix-surface-keyboard.sh (100%) rename install/{config => }/hardware/fix-synaptic-touchpad.sh (100%) rename install/{config => }/hardware/fix-tuxedo-backlight.sh (100%) rename install/{config => }/hardware/fix-yt6801-ethernet-adapter.sh (100%) rename install/{config => }/hardware/framework/qmk-hid.sh (100%) rename install/{packaging => hardware}/framework16.sh (100%) rename install/{config => hardware}/input-group.sh (100%) rename install/{config => }/hardware/intel/fix-wifi7-eht.sh (100%) rename install/{config => }/hardware/intel/fred.sh (68%) rename install/{config => }/hardware/intel/ipu7-camera.sh (100%) rename install/{config => }/hardware/intel/lpmd.sh (100%) rename install/{config => }/hardware/intel/ptl-kernel.sh (100%) rename install/{config => }/hardware/intel/sof-firmware.sh (100%) rename install/{config => }/hardware/intel/thermald.sh (100%) rename install/{config => }/hardware/intel/video-acceleration.sh (100%) rename install/{config => }/hardware/lenovo/fix-yoga-pro7-bass-speakers.sh (100%) rename install/{config => }/hardware/network.sh (100%) rename install/{config => }/hardware/nvidia.sh (100%) create mode 100644 install/hardware/pacman.sh rename install/{config => }/hardware/set-wireless-regdom.sh (100%) rename install/{packaging => hardware}/surface.sh (100%) rename install/{config => }/hardware/vulkan.sh (100%) delete mode 100644 install/helpers/all.sh delete mode 100644 install/helpers/errors.sh delete mode 100644 install/helpers/mode.sh delete mode 100644 install/helpers/presentation.sh delete mode 100644 install/login/all.sh delete mode 100644 install/login/hibernation.sh delete mode 100644 install/login/limine-snapper.sh delete mode 100644 install/packaging/all.sh delete mode 100644 install/packaging/base.sh delete mode 100644 install/packaging/icons.sh delete mode 100644 install/packaging/nvim.sh delete mode 100644 install/packaging/system.sh delete mode 100644 install/packaging/tuis.sh delete mode 100644 install/packaging/user.sh delete mode 100644 install/packaging/webapps.sh delete mode 100644 install/post-install/all.sh delete mode 100644 install/post-install/allow-reboot.sh create mode 100644 install/post-install/dns-resolver.sh delete mode 100644 install/post-install/finished.sh delete mode 100644 install/post-install/first-run-mode.sh delete mode 100644 install/post-install/legacy-cleanup.sh delete mode 100644 install/preflight/all.sh delete mode 100644 install/preflight/begin.sh delete mode 100644 install/preflight/disable-mkinitcpio.sh delete mode 100644 install/preflight/first-run-mode.sh delete mode 100644 install/preflight/guard.sh delete mode 100644 install/preflight/migrations.sh delete mode 100644 install/preflight/show-env.sh delete mode 100644 install/system/all.sh rename install/{login => user}/default-keyring.sh (100%) rename install/{first-run/gnome-theme-user.sh => user/first-run/gnome-theme.sh} (100%) rename install/{ => user}/first-run/gtk-primary-paste.sh (100%) rename install/{ => user}/first-run/install-voxtype.hook (100%) rename install/{ => user}/first-run/welcome.sh (100%) rename install/{ => user}/first-run/wifi.sh (100%) rename install/{config => user}/git.sh (100%) rename install/{config => user}/hardware/asus/fix-audio-mixer.sh (100%) rename install/{config => user}/hardware/asus/fix-mic.sh (100%) rename install/{config/hardware/bluetooth-user.sh => user/hardware/bluetooth.sh} (76%) rename install/{config => user}/hardware/framework/fix-f13-amd-audio-input.sh (100%) rename install/{first-run => user/hardware}/recover-internal-monitor.sh (100%) rename install/{config => user}/mise-work.sh (68%) rename install/{packaging => user}/mise.sh (100%) create mode 100644 install/user/sleep-lock.sh create mode 100644 install/user/theme.sh rename install/{config => user}/xcompose.sh (100%) delete mode 100644 migrations/1751134560.sh delete mode 100644 migrations/1751134562.sh delete mode 100644 migrations/1751134563.sh delete mode 100644 migrations/1751134564.sh delete mode 100644 migrations/1751134568.sh delete mode 100644 migrations/1751135253.sh delete mode 100644 migrations/1751510848.sh delete mode 100644 migrations/1751667620.sh delete mode 100644 migrations/1751669258.sh delete mode 100644 migrations/1751672984.sh delete mode 100644 migrations/1751679069.sh delete mode 100644 migrations/1751821819.sh delete mode 100644 migrations/1752081088.sh delete mode 100644 migrations/1752082381.sh delete mode 100644 migrations/1752091783.sh delete mode 100644 migrations/1752104271.sh delete mode 100644 migrations/1752188554.sh delete mode 100644 migrations/1752292967.sh delete mode 100644 migrations/1752535084.sh delete mode 100644 migrations/1752535341.sh delete mode 100644 migrations/1752543801.sh delete mode 100644 migrations/1752643269.sh delete mode 100644 migrations/1752678932.sh delete mode 100644 migrations/1752725616.sh delete mode 100644 migrations/1752797704.sh delete mode 100644 migrations/1752874371.sh delete mode 100644 migrations/1752896442.sh delete mode 100644 migrations/1752897642.sh delete mode 100644 migrations/1752955912.sh delete mode 100644 migrations/1753495989.sh delete mode 100644 migrations/1753689791.sh delete mode 100644 migrations/1753908454.sh delete mode 100644 migrations/1754047941.sh delete mode 100644 migrations/1754109724.sh delete mode 100644 migrations/1754215533.sh delete mode 100644 migrations/1754221967.sh delete mode 100644 migrations/1754332200.sh delete mode 100644 migrations/1754509222.sh delete mode 100644 migrations/1754514972.sh delete mode 100644 migrations/1754566681.sh delete mode 100644 migrations/1754668999.sh delete mode 100644 migrations/1754856741.sh delete mode 100644 migrations/1754860578.sh delete mode 100644 migrations/1754984734.sh delete mode 100644 migrations/1754996869.sh delete mode 100644 migrations/1755109182.sh delete mode 100644 migrations/1755139080.sh delete mode 100644 migrations/1755208929.sh delete mode 100644 migrations/1755436367.sh delete mode 100644 migrations/1755455095.sh delete mode 100644 migrations/1755459930.sh delete mode 100644 migrations/1755494432.sh delete mode 100644 migrations/1755507891.sh delete mode 100644 migrations/1755795450.sh delete mode 100644 migrations/1755865046.sh delete mode 100644 migrations/1755867743.sh delete mode 100644 migrations/1755904244.sh delete mode 100644 migrations/1755920552.sh delete mode 100644 migrations/1755930114.sh delete mode 100644 migrations/1756060611.sh delete mode 100644 migrations/1756115364.sh delete mode 100644 migrations/1756203383.sh delete mode 100644 migrations/1756205202.sh delete mode 100644 migrations/1756300740.sh delete mode 100644 migrations/1756360552.sh delete mode 100644 migrations/1756410649.sh delete mode 100644 migrations/1756411333.sh delete mode 100644 migrations/1756411865.sh delete mode 100644 migrations/1756491748.sh delete mode 100644 migrations/1756494998.sh delete mode 100644 migrations/1756507384.sh delete mode 100644 migrations/1756556731.sh delete mode 100644 migrations/1756629295.sh delete mode 100644 migrations/1756642681.sh delete mode 100644 migrations/1756650507.sh delete mode 100644 migrations/1756911131.sh delete mode 100644 migrations/1757021485.sh delete mode 100644 migrations/1757147211.sh delete mode 100644 migrations/1757361127.sh delete mode 100644 migrations/1757361128.sh delete mode 100644 migrations/1757435811.sh delete mode 100644 migrations/1757435812.sh delete mode 100644 migrations/1757483378.sh delete mode 100644 migrations/1757535736.sh delete mode 100644 migrations/1757783204.sh delete mode 100644 migrations/1757879836.sh delete mode 100644 migrations/1758019332.sh delete mode 100644 migrations/1758051607.sh delete mode 100644 migrations/1758104201.sh delete mode 100644 migrations/1758111304.sh delete mode 100644 migrations/1758142943.sh delete mode 100644 migrations/1758436991.sh delete mode 100644 migrations/1758455816.sh delete mode 100644 migrations/1758487660_change_dm_to_sddm.sh delete mode 100644 migrations/1758487662_move_to_custom_uki.sh delete mode 100644 migrations/1758562032.sh delete mode 100644 migrations/1758734243.sh delete mode 100644 migrations/1759355846.sh delete mode 100644 migrations/1759691413.sh delete mode 100644 migrations/1759895423.sh delete mode 100644 migrations/1759913695.sh delete mode 100644 migrations/1760144906.sh delete mode 100644 migrations/1760301290.sh delete mode 100644 migrations/1760304963.sh delete mode 100644 migrations/1760434895.sh delete mode 100644 migrations/1760441237.sh delete mode 100644 migrations/1760471009.sh delete mode 100644 migrations/1760684828.sh delete mode 100644 migrations/1760724934.sh delete mode 100644 migrations/1760730253.sh delete mode 100644 migrations/1761180745.sh delete mode 100644 migrations/1761241493.sh delete mode 100644 migrations/1761247569.sh delete mode 100644 migrations/1761274806.sh delete mode 100644 migrations/1761274980.sh delete mode 100644 migrations/1761585764.sh delete mode 100644 migrations/1761638377.sh delete mode 100644 migrations/1761758552.sh delete mode 100644 migrations/1761897226.sh delete mode 100644 migrations/1762121828.sh delete mode 100644 migrations/1762156000.sh delete mode 100644 migrations/1762417304.sh delete mode 100644 migrations/1762446739.sh delete mode 100644 migrations/1762711005.sh delete mode 100644 migrations/1762768186.sh delete mode 100644 migrations/1762770442.sh delete mode 100644 migrations/1762770815.sh delete mode 100644 migrations/1762781907.sh delete mode 100644 migrations/1763409182.sh delete mode 100644 migrations/1763478660.sh delete mode 100644 migrations/1763558828.sh delete mode 100644 migrations/1763561396.sh delete mode 100644 migrations/1763583093.sh delete mode 100644 migrations/1763626772.sh delete mode 100644 migrations/1763633307.sh delete mode 100644 migrations/1763753641.sh delete mode 100644 migrations/1764067963.sh delete mode 100644 migrations/1764272475.sh delete mode 100644 migrations/1764333665.sh delete mode 100644 migrations/1765587218.sh delete mode 100644 migrations/1765744321.sh delete mode 100644 migrations/1765846739.sh delete mode 100644 migrations/1765884267.sh delete mode 100644 migrations/1766942230.sh delete mode 100644 migrations/1767306902.sh delete mode 100644 migrations/1767478687.sh delete mode 100644 migrations/1767865784.sh delete mode 100644 migrations/1768236764.sh delete mode 100644 migrations/1768906440.sh delete mode 100644 migrations/1768916735.sh delete mode 100644 migrations/1769183359.sh delete mode 100644 migrations/1769510847.sh delete mode 100644 migrations/1769616857.sh delete mode 100644 migrations/1769619823.sh delete mode 100644 migrations/1770393078.sh delete mode 100644 migrations/1770483021.sh delete mode 100644 migrations/1770638893.sh delete mode 100644 migrations/1771002522.sh delete mode 100644 migrations/1771188969.sh delete mode 100644 migrations/1771345870.sh delete mode 100644 migrations/1771403119.sh delete mode 100644 migrations/1771615907.sh delete mode 100644 migrations/1771667323.sh delete mode 100644 migrations/1771670389.sh delete mode 100644 migrations/1771682500.sh delete mode 100644 migrations/1771683296.sh delete mode 100644 migrations/1772051864.sh delete mode 100644 migrations/1772211023.sh delete mode 100644 migrations/1772294096.sh delete mode 100644 migrations/1772379119.sh delete mode 100644 migrations/1772389838.sh delete mode 100644 migrations/1772632144.sh delete mode 100644 migrations/1772907198.sh delete mode 100644 migrations/1772964511.sh delete mode 100644 migrations/1772981555.sh delete mode 100644 migrations/1772981757.sh delete mode 100644 migrations/1772988614.sh delete mode 100644 migrations/1772990935.sh delete mode 100644 migrations/1773012889.sh delete mode 100644 migrations/1773505447.sh delete mode 100644 migrations/1773506226.sh delete mode 100644 migrations/1773599943.sh delete mode 100644 migrations/1774366575.sh delete mode 100644 migrations/1774401148.sh delete mode 100644 migrations/1774642699.sh delete mode 100644 migrations/1775059710.sh delete mode 100644 migrations/1775241210.sh delete mode 100644 migrations/1775546086.sh delete mode 100644 migrations/1775691486.sh delete mode 100644 migrations/1775954402.sh delete mode 100644 migrations/1776246235.sh delete mode 100644 migrations/1776346552.sh delete mode 100644 migrations/1776434586.sh delete mode 100644 migrations/1776611242.sh delete mode 100644 migrations/1776615976.sh delete mode 100644 migrations/1776617403.sh delete mode 100644 migrations/1776781956.sh delete mode 100644 migrations/1776784497.sh delete mode 100644 migrations/1776927490.sh delete mode 100644 migrations/1776935686.sh delete mode 100644 migrations/1777018408.sh delete mode 100644 migrations/1777072987.sh delete mode 100644 migrations/1777145626.sh delete mode 100644 migrations/1777282771.sh delete mode 100644 migrations/1777396666.sh delete mode 100644 migrations/1777450869.sh delete mode 100644 migrations/1777546300.sh delete mode 100644 migrations/1777570652.sh delete mode 100644 migrations/1777572869.sh delete mode 100644 migrations/1777618046.sh delete mode 100644 migrations/1777653181.sh delete mode 100644 migrations/1777800806.sh delete mode 100644 migrations/1777909712.sh delete mode 100644 migrations/1777929468.sh delete mode 100644 migrations/1777938402.sh delete mode 100644 migrations/1778001804.sh delete mode 100644 migrations/1778026496.sh delete mode 100644 migrations/1778052575.sh delete mode 100644 migrations/1778079164.sh delete mode 100644 migrations/1778099894.sh delete mode 100644 migrations/1778148645.sh delete mode 100644 migrations/1778165347.sh delete mode 100644 migrations/1778222128.sh delete mode 100644 migrations/1778233760.sh delete mode 100644 migrations/1778270869.sh delete mode 100644 migrations/1778291336.sh delete mode 100644 migrations/1778307905.sh delete mode 100644 migrations/1778321093.sh delete mode 100644 migrations/1778346208.sh delete mode 100644 migrations/1778388568.sh delete mode 100644 migrations/1778506941.sh delete mode 100644 migrations/1778510426.sh delete mode 100644 migrations/1778743515.sh delete mode 100644 migrations/1778752973.sh delete mode 100644 migrations/1778847256.sh delete mode 100644 migrations/1778847558.sh delete mode 100644 migrations/1778851263.sh delete mode 100644 migrations/1778956449.sh delete mode 100644 migrations/1779047753.sh delete mode 100644 migrations/1779107651.sh delete mode 100644 migrations/1779137438.sh delete mode 100644 migrations/1779171487.sh delete mode 100644 migrations/1779180647.sh delete mode 100644 migrations/1779182943.sh delete mode 100644 migrations/1779184948.sh delete mode 100644 migrations/1779203294.sh delete mode 100644 migrations/1779210892.sh delete mode 100644 migrations/1779216860.sh delete mode 100644 migrations/1779218170.sh delete mode 100644 migrations/1779219192.sh delete mode 100644 migrations/1779232736.sh delete mode 100644 migrations/1779242346.sh delete mode 100644 migrations/1779259320.sh delete mode 100644 migrations/1779277899.sh delete mode 100644 migrations/1779283409.sh delete mode 100644 migrations/1779286136.sh delete mode 100644 migrations/1779287628.sh delete mode 100644 migrations/1779297337.sh delete mode 100644 migrations/1779303581.sh delete mode 100644 migrations/1779307210.sh delete mode 100644 migrations/1779309700.sh delete mode 100644 migrations/1779330555.sh delete mode 100644 migrations/1779350210.sh delete mode 100644 migrations/1779357523.sh delete mode 100644 migrations/1779449206.sh delete mode 100644 migrations/1779481017.sh delete mode 100644 migrations/1779627463.sh delete mode 100644 migrations/1779696759.sh delete mode 100644 migrations/1779715013.sh create mode 100644 migrations/1780000000_4_0.sh delete mode 100755 system-finalize.sh delete mode 100755 test/offline-finalizer-bootstrap-test.sh diff --git a/AGENTS.md b/AGENTS.md index 7d55bc5f..f67fec8d 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -74,18 +74,19 @@ Example: # Install Scripts -Install entry points (`install.sh`, `boot.sh`) use `#!/bin/bash`. Many scripts under `install/` are sourced via `run_logged` and intentionally do not have shebangs. +The ISO owns installation orchestration. This repo ships target-side setup commands and reusable setup leaves: -Install stage files follow this pattern: +- `bin/omarchy-setup-system` runs root-owned system setup during ISO finalization. +- `bin/omarchy-setup-hardware` runs idempotent hardware-specific setup and is called by `omarchy-setup-system`. +- `bin/omarchy-setup-user` runs user setup for the initial user and future users. +- leaf scripts under `install/` are sourced by `run_logged $OMARCHY_INSTALL/path/to/script.sh` and intentionally do not have shebangs. +- avoid `exit` in sourced setup scripts unless intentionally aborting setup. +- use `$OMARCHY_INSTALL` and `$OMARCHY_PATH` instead of hard-coded Omarchy paths. +- keep root-scoped hardware setup under `install/hardware/` and orchestrate it through `install/hardware/all.sh`. +- keep every per-user setup leaf under `install/user/` (including `install/user/hardware/` and `install/user/first-run/`) so it is clear what must run for each user. +- prefer helper commands for package and command checks where available. -- `install/*/all.sh` lists scripts in execution order -- leaf scripts are sourced by `run_logged $OMARCHY_INSTALL/path/to/script.sh` -- avoid `exit` in sourced install scripts unless intentionally aborting the install -- use `$OMARCHY_INSTALL` and `$OMARCHY_PATH` instead of hard-coded Omarchy paths -- keep hardware-specific logic under `install/config/hardware/` -- prefer helper commands for package and command checks where available - -Raw `command -v`, `pacman`, and `pacman-key` are acceptable in bootstrap/preflight/package-helper contexts where the helper commands may not be available yet or where direct package-manager behavior is the point of the script. +Raw `command -v`, `pacman`, and `pacman-key` are acceptable in package-helper contexts where direct package-manager behavior is the point of the script. # Helper Commands @@ -98,7 +99,7 @@ Use these instead of raw shell commands: - `omarchy-notification-send` - send desktop notifications; do not call `notify-send` directly - `omarchy-hw-asus-rog` - detect ASUS ROG hardware (and similar `hw-*` commands) -Exceptions are allowed for bootstrap, preflight, migration, and package-helper scripts where the helper may not be available yet, where the helper itself is being implemented, or where direct package-manager behavior is required. +Exceptions are allowed for migration and package-helper scripts where the helper may not be available yet, where the helper itself is being implemented, or where direct package-manager behavior is required. # Config Structure @@ -170,7 +171,7 @@ To copy a default config to user config with automatic backup: omarchy-refresh-config hypr/hyprlock.conf ``` -This copies `~/.local/share/omarchy/config/hypr/hyprlock.conf` to `~/.config/hypr/hyprlock.conf`. +This copies `$OMARCHY_PATH/config/hypr/hyprlock.conf` to `~/.config/hypr/hyprlock.conf`. # Migrations @@ -183,6 +184,6 @@ New migration format: - Use `$OMARCHY_PATH` to reference the omarchy directory - Prefer helper commands such as `omarchy-cmd-present`, `omarchy-cmd-missing`, `omarchy-pkg-present`, and `omarchy-pkg-missing` -Some older migrations predate these rules. Do not copy older migrations that start with shebangs, omit the leading `echo`, or hard-code `~/.local/share/omarchy`. +Omarchy 4.0 intentionally collapses historical migrations into a single package-layout migration. Do not add compatibility migrations for old installer layouts. -Migrations may use raw `pacman`, `command -v`, or direct config edits when needed for historical compatibility or one-off repair work. +Migrations may use raw `pacman`, `command -v`, or direct config edits when needed for one-off repair work. diff --git a/REVIEW-CROSSWALK.md b/REVIEW-CROSSWALK.md deleted file mode 100644 index 484cd21e..00000000 --- a/REVIEW-CROSSWALK.md +++ /dev/null @@ -1,95 +0,0 @@ -# Installer Revamp Review Crosswalk - -This branch is easiest to review as a behavior migration: each row below maps an old install script/behavior to its new owner and phase. - -## Install architecture - -| Phase | Entry point | Runs as | Runs when | Owns | -|---|---|---|---|---| -| System install | `system-finalize.sh` -> `install/system/all.sh` | root with `OMARCHY_INSTALL_USER` set to the non-root target user | once at install/finalize time | machine config, services, login manager, root-owned post-install cleanup | -| User setup | `omarchy-setup-user` -> `install/user/all.sh` | target user | install user during `finalize.sh`, and every future user on first login | home config, AI skills, XDG dirs, app launchers, user services, user/session hardware tweaks | -| User finalization | `finalize.sh` | target user | once during install | marks shipped migrations done, creates offline first-run marker, calls `omarchy-setup-user --force`, shows finish/reboot UI | -| First run system one-shot | `omarchy-first-run` when `~/.local/state/omarchy/first-run.mode` exists | install user with temporary sudoers | first graphical login after offline install | firewall/DNS/icon-cache/voxtype work that needs a live boot | -| First run user one-shot | `omarchy-first-run` when `first-run-user.done` is missing | current user | first graphical login for every user | session-only user tasks: monitor recovery, GNOME settings, primary paste, welcome, Wi-Fi | -| Package-owned defaults | `etc/**`, `config/**`, `applications/**`, `default/**` via `omarchy-settings` / `omarchy` packages | pacman | package install/upgrade | static `/etc`, `/etc/skel`, `/usr/share/omarchy` defaults | - -Rules of thumb: - -- `install/system/**` should not write a user's home directory except through explicit target-user metadata like `OMARCHY_INSTALL_USER`. -- `omarchy-setup-user` is the canonical path for current and future users. `/etc/skel` seeds new homes, but setup-user keeps existing users and first-login users aligned. The runtime `omarchy` package depends on `omarchy-installer` so `/usr/share/omarchy/install/user/**` is present for future users. -- `install/user/**` contains reusable user setup pieces, but callers should normally invoke `omarchy-setup-user` rather than source those files directly. - -## Crosswalk - -| Old file / behavior | New owner(s) | Phase | Review status / verification | -|---|---|---|---| -| `install.sh` ran package install then directly entered `finalize.sh`. | `install.sh` now runs root `system-finalize.sh` with `OMARCHY_INSTALL_USER=$USER`, then user `finalize.sh`. Offline callers must do the same root-before-user handoff. | system -> user | `rg 'system-finalize|OMARCHY_INSTALL_USER|finalize.sh' install.sh system-finalize.sh` | -| `finalize.sh` ran all system/user/post-install phases. | `system-finalize.sh` owns system phases; `finalize.sh` now calls `omarchy-setup-user --force` and `post-install/finished.sh`. | split | `rg 'omarchy-setup-user|finished.sh|system/all' finalize.sh system-finalize.sh` | -| `install/packaging/all.sh` mixed hardware package work and user app setup. | `install/packaging/system.sh` for hardware-gated packages; `install/packaging/user.sh` for user package setup (`nvim`). App launchers/npm wrappers are driven through `omarchy-refresh-applications` in setup-user. | split | `cat install/packaging/{all,system,user}.sh` | -| `install/config/config.sh` copied `config/**` and bashrc into the install user's home. | `omarchy-settings` seeds `/etc/skel`; `omarchy-setup-user` copies `config/**`, `.bashrc`, and `.bash_profile` for existing/current users. | user setup + package/skel | `rg 'cp -R .*config|bashrc' bin/omarchy-setup-user` | -| `install/config/theme.sh` mixed system icon/Chromium setup and user theme setup. | `install/config/theme-system.sh` and `install/config/theme-user.sh`. | split | `cat install/config/theme-{system,user}.sh` | -| `install/first-run/gnome-theme.sh` mixed user `gsettings` with root icon-cache refresh. | `install/first-run/gnome-theme-system.sh` and `install/first-run/gnome-theme-user.sh`. | first-run split | `cat install/first-run/gnome-theme-{system,user}.sh` | -| `install/config/branding.sh` copied branding into the user config. | `/etc/skel/.config/omarchy/branding` via package plus refresh in `omarchy-setup-user`. | package + user setup | `rg 'branding' bin/omarchy-setup-user /home/ryan/Work/omarchy/omarchy-pkgs/pkgbuilds/omarchy-settings/PKGBUILD` | -| `install/config/omarchy-ai-skill.sh` symlinked assistant skills. | `omarchy-setup-user`. | per-user | `rg 'skills/omarchy' bin/omarchy-setup-user` | -| `install/config/omarchy-toggles.sh` seeded toggle flags. | `omarchy-setup-user`; `omarchy-refresh-hyprland` also refreshes flags when resetting Hypr configs. | per-user | `rg 'flags.lua|toggles' bin/omarchy-setup-user bin/omarchy-refresh-hyprland` | -| `install/config/detect-keyboard-layout.sh` inserted `/etc/vconsole.conf` layout into Hypr config. | `omarchy-setup-user`; `omarchy-refresh-hyprland` contains the same idempotent refresh behavior. | per-user | `rg 'XKBLAYOUT|kb_layout' bin/omarchy-setup-user bin/omarchy-refresh-hyprland` | -| `install/config/user-dirs.sh` created XDG dirs/bookmarks. | `omarchy-setup-user` with idempotent bookmark insertion. | per-user | `rg 'xdg-user-dirs|bookmarks' bin/omarchy-setup-user` | -| `install/config/mimetypes.sh` set app/MIME defaults. | `omarchy-refresh-applications` plus `xdg-settings` / `xdg-mime` in `omarchy-setup-user`. | per-user | `rg 'omarchy-refresh-applications|xdg-mime|xdg-settings' bin/omarchy-setup-user` | -| `install/config/nautilus-python.sh` copied Nautilus extensions. | `omarchy-setup-user`. | per-user | `rg 'nautilus-python' bin/omarchy-setup-user` | -| `install/config/localdb.sh` ran `updatedb`. | `install/post-install/localdb.sh`. | system post-install | `cat install/post-install/localdb.sh` | -| `install/config/docker.sh` restarted/daemon-reloaded Docker bits and added current user to docker. | Package-owned Docker/resolved config in `etc/**`; `docker.sh` keeps the install-user group membership. | system + package | `cat install/config/docker.sh etc/docker/daemon.json etc/systemd/system/docker.service.d/no-block-boot.conf` | -| `install/config/enable-services.sh` and service enables scattered elsewhere. | `install/config/enable-services.sh` is the centralized service-enable step for bluetooth/cups/avahi/docker/NetworkManager/power-profiles/sddm. | system | `rg 'systemctl enable' install` | -| `install/config/hardware/network.sh` enabled NetworkManager and disabled iwd/wait-online. | NetworkManager enable moved to `enable-services.sh`; `network.sh` only disables iwd and masks wait-online. | system | `cat install/config/enable-services.sh install/config/hardware/network.sh` | -| `install/config/hardware/bluetooth.sh` mixed `/etc/bluetooth` with user WirePlumber and `bt-agent`. | `bluetooth.sh` keeps system AutoEnable; `bluetooth-user.sh` handles user WirePlumber and user service; `/etc/skel` symlink seeds future users. | split | `cat install/config/hardware/bluetooth{,-user}.sh; find config/systemd/user -maxdepth 3 -type l -ls` | -| `install/config/hardware/nvidia.sh` installed drivers, wrote `/etc`, and appended user Hypr env vars. | `nvidia.sh` keeps driver/system config; `nvidia-user.sh` appends user env vars idempotently. | split | `cat install/config/hardware/nvidia{,-user}.sh` | -| ASUS audio mixer/mic scripts ran in system config. | Moved to `install/config/user.sh`; behavior preserved in `asus/fix-audio-mixer.sh` and `asus/fix-mic.sh`. | per-user/session | `rg 'fix-audio-mixer|fix-mic' install/config/user.sh install/config/hardware/asus` | -| Framework AMD F13 audio input ran in system config. | Moved to `install/config/user.sh`; `framework/fix-f13-amd-audio-input.sh` preserves the `pactl` profile fix. | per-user/session | `rg 'fix-f13|pactl' install/config/user.sh install/config/hardware/framework` | -| `install/config/hardware/fix-synaptic-touchpad.sh` was removed in the split. | Restored and called from `install/config/all.sh`. | system hardware | `rg 'fix-synaptic-touchpad' install/config/all.sh install/config/hardware/fix-synaptic-touchpad.sh` | -| `install/config/lockscreen-pam.sh` delegated to `omarchy-setup-lock`. | Kept as `omarchy-setup-lock`; `omarchy-setup-lock` now honors `OMARCHY_INSTALL_USER`. | system helper | `cat install/config/lockscreen-pam.sh; rg 'OMARCHY_INSTALL_USER' bin/omarchy-setup-lock` | -| `install/config/increase-fd-limit.sh` wrote systemd manager nofile drop-ins. | Package-owned `etc/systemd/system.conf.d/20-omarchy-nofile.conf` and `etc/systemd/user.conf.d/20-omarchy-nofile.conf`; legacy `99` files removed by `post-install/legacy-cleanup.sh`. | package + cleanup | `cat etc/systemd/{system.conf.d,user.conf.d}/20-omarchy-nofile.conf install/post-install/legacy-cleanup.sh` | -| `install/config/increase-file-watchers.sh` ran `sysctl --system`. | Package-owned `etc/sysctl.d/90-omarchy-file-watchers.conf`; install is followed by reboot. | package | `cat etc/sysctl.d/90-omarchy-file-watchers.conf` | -| `install/config/fast-shutdown.sh` only reloaded systemd after drop-ins. | Package-owned faster-shutdown drop-ins; install is followed by reboot. | package | `cat etc/systemd/system.conf.d/10-faster-shutdown.conf etc/systemd/system/user@.service.d/10-faster-shutdown.conf` | -| `install/config/powerprofilesctl-rules.sh` and `wifi-powersave-rules.sh` wrote/reloaded udev rules. | Package-owned `etc/udev/rules.d/99-omarchy-*.rules`; `post-install/legacy-cleanup.sh` removes old non-namespaced rules; `post-install/udev.sh` reloads/triggers. | package + post-install | `cat etc/udev/rules.d/99-omarchy-*.rules install/post-install/{legacy-cleanup,udev}.sh` | -| `install/config/gpg.sh` copied GnuPG config and restarted dirmngr. | Package-owned `etc/gnupg/dirmngr.conf`; live dirmngr restart removed. | package | `cat etc/gnupg/dirmngr.conf` | -| `install/config/pi.sh` activated Pi theme. | No direct install path remains; theme changes still run Pi retint hooks when applicable. | intentionally removed / review | `rg 'omarchy-theme-set-pi' bin install migrations` | -| `install/login/all.sh` mixed default keyring with SDDM/login manager work. | `install/login/system.sh` owns SDDM/hibernation/limine; `install/login/default-keyring.sh` runs through user setup and is idempotent. | split | `cat install/login/system.sh install/login/default-keyring.sh` | -| `install/login/sddm.sh` wrote/copied static SDDM config/assets, autologin, PAM tweaks, and enabled service. | Static SDDM drop-ins live under `etc/sddm.conf.d`; theme/session assets are package-owned; `sddm.sh` now manages only autologin, legacy `hyprland.conf` cleanup, and PAM tweaks; service enable moved to `enable-services.sh`. | package + system | `cat etc/sddm.conf.d/*.conf install/login/sddm.sh install/config/enable-services.sh` | -| `install/post-install/allow-reboot.sh` created online reboot sudoers. | Kept, now also grants one-time cleanup; `omarchy-first-run` calls `cleanup-reboot-sudoers.sh` with `sudo -n` so future users are not prompted. | online post-install + first-run cleanup | `cat install/post-install/allow-reboot.sh install/first-run/cleanup-reboot-sudoers.sh` | - -## Deleted migration/helper policy - -Old migrations that only sourced helpers now replaced by package-owned files were removed with their helpers. Legacy cleanup that still matters moved into `install/post-install/legacy-cleanup.sh`: - -- old udev rule names: `/etc/udev/rules.d/99-power-profile.rules`, `/etc/udev/rules.d/99-wifi-powersave.rules` -- old nofile drop-in names: `/etc/systemd/system.conf.d/99-omarchy-nofile.conf`, `/etc/systemd/user.conf.d/99-omarchy-nofile.conf` - -## Review commit plan - -The branch should be reviewed in this order: - -1. `installer: split root and user finalization` - - `install.sh`, `system-finalize.sh`, `finalize.sh`, `install/system/all.sh`, `install/user/all.sh`, helper/root-aware changes. -2. `setup: make omarchy-setup-user canonical for users` - - `bin/omarchy-setup-user`, `bin/omarchy-first-run`, user setup idempotency fixes, `default-keyring`, `cleanup-reboot-sudoers`. -3. `install: split packaging phases` - - `install/packaging/{all,system,user}.sh` and app setup routing through `omarchy-refresh-applications`. -4. `install: split theme and first-run theme setup` - - `theme.sh` -> `theme-system.sh` / `theme-user.sh`; `gnome-theme.sh` -> first-run system/user split. -5. `install: move static system config to package-owned files` - - `etc/**` additions, removal of no-op helpers/migrations, post-install legacy cleanup/udev/localdb. -6. `install: split user-scoped hardware/session config` - - bluetooth/nvidia split, ASUS/Framework user audio fixes, Synaptics restoration. -7. `install: split SDDM config from autologin` - - package-owned SDDM drop-ins, trimmed `sddm.sh`, centralized service enable. -8. `docs: add installer review crosswalk` - - this file. - -## Follow-up checks - -```bash -git status --porcelain=v1 --untracked-files=all -rg 'systemctl enable' install -rg 'fast-shutdown|increase-file-watchers|powerprofilesctl-rules|wifi-powersave-rules|increase-fd-limit' install migrations bin || true -bash -n install.sh system-finalize.sh finalize.sh bin/omarchy-setup-user bin/omarchy-first-run -bash test/offline-finalizer-bootstrap-test.sh -``` diff --git a/applications/Basecamp.desktop b/applications/Basecamp.desktop new file mode 100644 index 00000000..7c518ba4 --- /dev/null +++ b/applications/Basecamp.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Version=1.0 +Name=Basecamp +Exec=omarchy-launch-webapp https://launchpad.37signals.com +Terminal=false +Type=Application +Icon=basecamp +StartupNotify=true diff --git a/applications/ChatGPT.desktop b/applications/ChatGPT.desktop new file mode 100644 index 00000000..2ec04673 --- /dev/null +++ b/applications/ChatGPT.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Version=1.0 +Name=ChatGPT +Exec=omarchy-launch-webapp https://chatgpt.com/ +Terminal=false +Type=Application +Icon=chatgpt +StartupNotify=true diff --git a/applications/Discord.desktop b/applications/Discord.desktop new file mode 100644 index 00000000..6a2039ca --- /dev/null +++ b/applications/Discord.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Version=1.0 +Name=Discord +Exec=omarchy-launch-webapp https://discord.com/channels/@me +Terminal=false +Type=Application +Icon=discord +StartupNotify=true diff --git a/applications/Disk Usage.desktop b/applications/Disk Usage.desktop new file mode 100644 index 00000000..8a18c798 --- /dev/null +++ b/applications/Disk Usage.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Version=1.0 +Name=Disk Usage +Exec=xdg-terminal-exec --app-id=TUI.float -e bash -c "dust -r; read -n 1 -s" +Terminal=false +Type=Application +Icon=disk-usage +StartupNotify=true diff --git a/applications/Docker.desktop b/applications/Docker.desktop new file mode 100644 index 00000000..4f9831c0 --- /dev/null +++ b/applications/Docker.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Version=1.0 +Name=Docker +Exec=xdg-terminal-exec --app-id=TUI.tile -e lazydocker +Terminal=false +Type=Application +Icon=docker +StartupNotify=true diff --git a/applications/Figma.desktop b/applications/Figma.desktop new file mode 100644 index 00000000..92be688a --- /dev/null +++ b/applications/Figma.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Version=1.0 +Name=Figma +Exec=omarchy-launch-webapp https://figma.com/ +Terminal=false +Type=Application +Icon=figma +StartupNotify=true diff --git a/applications/Fizzy.desktop b/applications/Fizzy.desktop new file mode 100644 index 00000000..062d1870 --- /dev/null +++ b/applications/Fizzy.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Version=1.0 +Name=Fizzy +Exec=omarchy-launch-webapp https://app.fizzy.do/ +Terminal=false +Type=Application +Icon=fizzy +StartupNotify=true diff --git a/applications/GitHub.desktop b/applications/GitHub.desktop new file mode 100644 index 00000000..76d09b86 --- /dev/null +++ b/applications/GitHub.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Version=1.0 +Name=GitHub +Exec=omarchy-launch-webapp https://github.com/ +Terminal=false +Type=Application +Icon=github +StartupNotify=true diff --git a/applications/Google Contacts.desktop b/applications/Google Contacts.desktop new file mode 100644 index 00000000..8f92c882 --- /dev/null +++ b/applications/Google Contacts.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Version=1.0 +Name=Google Contacts +Exec=omarchy-launch-webapp https://contacts.google.com/ +Terminal=false +Type=Application +Icon=google-contacts +StartupNotify=true diff --git a/applications/Google Maps.desktop b/applications/Google Maps.desktop new file mode 100644 index 00000000..3cf546b6 --- /dev/null +++ b/applications/Google Maps.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Version=1.0 +Name=Google Maps +Exec=omarchy-launch-webapp https://maps.google.com +Terminal=false +Type=Application +Icon=google-maps +StartupNotify=true diff --git a/applications/Google Messages.desktop b/applications/Google Messages.desktop new file mode 100644 index 00000000..18474555 --- /dev/null +++ b/applications/Google Messages.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Version=1.0 +Name=Google Messages +Exec=omarchy-launch-webapp https://messages.google.com/web/conversations +Terminal=false +Type=Application +Icon=google-messages +StartupNotify=true diff --git a/applications/Google Photos.desktop b/applications/Google Photos.desktop new file mode 100644 index 00000000..44ccd254 --- /dev/null +++ b/applications/Google Photos.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Version=1.0 +Name=Google Photos +Exec=omarchy-launch-webapp https://photos.google.com/ +Terminal=false +Type=Application +Icon=google-photos +StartupNotify=true diff --git a/applications/HEY.desktop b/applications/HEY.desktop new file mode 100644 index 00000000..e59bd0ea --- /dev/null +++ b/applications/HEY.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Version=1.0 +Name=HEY +Exec=omarchy-webapp-handler-hey %u +Terminal=false +Type=Application +Icon=hey +StartupNotify=true +MimeType=x-scheme-handler/mailto diff --git a/applications/WhatsApp.desktop b/applications/WhatsApp.desktop new file mode 100644 index 00000000..f193616d --- /dev/null +++ b/applications/WhatsApp.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Version=1.0 +Name=WhatsApp +Exec=omarchy-launch-webapp https://web.whatsapp.com/ +Terminal=false +Type=Application +Icon=whatsapp +StartupNotify=true diff --git a/applications/X.desktop b/applications/X.desktop new file mode 100644 index 00000000..02fe0424 --- /dev/null +++ b/applications/X.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Version=1.0 +Name=X +Exec=omarchy-launch-webapp https://x.com/ +Terminal=false +Type=Application +Icon=x +StartupNotify=true diff --git a/applications/YouTube.desktop b/applications/YouTube.desktop new file mode 100644 index 00000000..d6659d75 --- /dev/null +++ b/applications/YouTube.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Version=1.0 +Name=YouTube +Exec=omarchy-launch-webapp https://youtube.com/ +Terminal=false +Type=Application +Icon=youtube +StartupNotify=true diff --git a/applications/Zoom.desktop b/applications/Zoom.desktop new file mode 100644 index 00000000..227abaa8 --- /dev/null +++ b/applications/Zoom.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Version=1.0 +Name=Zoom +Exec=omarchy-webapp-handler-zoom %u +Terminal=false +Type=Application +Icon=zoom +StartupNotify=true +MimeType=x-scheme-handler/zoommtg;x-scheme-handler/zoomus diff --git a/applications/battlenet.desktop b/applications/battlenet.desktop index ebd83692..f1499c72 100644 --- a/applications/battlenet.desktop +++ b/applications/battlenet.desktop @@ -4,7 +4,7 @@ Name=Battle.net GenericName=Game Launcher Comment=Blizzard game launcher (umu-launcher + GE-Proton) Exec=omarchy-launch-battlenet -Icon=Battle.net +Icon=battle-net Terminal=false Categories=Game; StartupNotify=true diff --git a/bin/omarchy-branch-set b/bin/omarchy-branch-set deleted file mode 100755 index 931bca25..00000000 --- a/bin/omarchy-branch-set +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -# omarchy:summary=Set the branch for Omarchy's git repository. -# omarchy:args= - -if (($# == 0)); then - echo "Usage: omarchy-branch-set [master|rc|dev]" - exit 1 -else - branch="$1" -fi - -if [[ $branch != "master" && $branch != "rc" && $branch != "dev" ]]; then - echo "Error: Invalid branch '$branch'. Must be one of: master, rc, dev" - exit 1 -fi - -git -C $OMARCHY_PATH switch $branch diff --git a/bin/omarchy-channel-set b/bin/omarchy-channel-set index b6c15d71..55d1e1bb 100755 --- a/bin/omarchy-channel-set +++ b/bin/omarchy-channel-set @@ -1,22 +1,21 @@ #!/bin/bash -# omarchy:summary=Set the Omarchy channel, which dictates what git branch and package repository is used. +# omarchy:summary=Set the Omarchy package channel. # omarchy:args= # omarchy:requires-sudo=true +set -e + if (($# == 0)); then echo "Usage: omarchy-channel-set [stable|rc|edge|dev]" exit 1 -else - channel="$1" fi +channel="$1" case "$channel" in -"stable") omarchy-branch-set "master" && omarchy-refresh-pacman "stable" ;; -"rc") omarchy-branch-set "rc" && omarchy-refresh-pacman "rc" ;; -"edge") omarchy-branch-set "master" && omarchy-refresh-pacman "edge" ;; -"dev") omarchy-branch-set "dev" && omarchy-refresh-pacman "edge" ;; -*) echo "Unknown channel: $channel"; exit 1; ;; + stable|rc|edge) omarchy-refresh-pacman "$channel" ;; + dev) omarchy-refresh-pacman edge ;; + *) echo "Unknown channel: $channel"; exit 1 ;; esac omarchy-update -y diff --git a/bin/omarchy-debug b/bin/omarchy-debug index c163e171..73be0df3 100755 --- a/bin/omarchy-debug +++ b/bin/omarchy-debug @@ -37,7 +37,7 @@ fi cat > "$LOG_FILE" </dev/null || echo "unknown") +Omarchy Package: $(pacman -Q omarchy 2>/dev/null || echo "unknown") ========================================= SYSTEM INFORMATION diff --git a/bin/omarchy-dev-add-migration b/bin/omarchy-dev-add-migration index bff94502..5446666f 100755 --- a/bin/omarchy-dev-add-migration +++ b/bin/omarchy-dev-add-migration @@ -1,13 +1,16 @@ #!/bin/bash -# omarchy:summary=Creates a new Omarchy migration named after the unix timestamp of the last commit. +# omarchy:summary=Create a new Omarchy migration in the current source tree. -cd ~/.local/share/omarchy -migration_file="$HOME/.local/share/omarchy/migrations/$(git log -1 --format=%cd --date=unix).sh" -touch $migration_file +set -euo pipefail -if [[ $1 != "--no-edit" ]]; then - nvim $migration_file +cd "${OMARCHY_PATH:-$(pwd)}" +mkdir -p migrations +migration_file="migrations/$(git log -1 --format=%cd --date=unix).sh" +touch "$migration_file" + +if [[ ${1:-} != "--no-edit" ]]; then + nvim "$migration_file" fi -echo $migration_file +printf '%s\n' "$PWD/$migration_file" diff --git a/bin/omarchy-dev-link b/bin/omarchy-dev-link index 091c8a4a..3345e29d 100755 --- a/bin/omarchy-dev-link +++ b/bin/omarchy-dev-link @@ -38,7 +38,7 @@ target=$(realpath -e "$1" 2>/dev/null) || { for required in bin default shell; do if [[ ! -d "$target/$required" ]]; then - echo "Warning: $target/$required not found — does this look like an omarchy-installer checkout?" >&2 + echo "Warning: $target/$required not found — does this look like an Omarchy source checkout?" >&2 fi done diff --git a/bin/omarchy-dev-pkg-test b/bin/omarchy-dev-pkg-test index 85c0220f..7a9e8ea7 100755 --- a/bin/omarchy-dev-pkg-test +++ b/bin/omarchy-dev-pkg-test @@ -11,7 +11,7 @@ if [[ ${1:-} == "-h" || ${1:-} == "--help" ]]; then cat <"$desktop_file" </dev/null - $NO_REBUILD || sudo tee -a /etc/default/limine < "$RESUME_DROP_IN" >/dev/null else echo "Warning: Could not determine resume offset for $SWAP_FILE" >&2 fi @@ -115,7 +113,6 @@ if grep -q "\[s2idle\]" /sys/power/mem_sleep 2>/dev/null; then echo "Enabling ACPI RTC alarm for s2idle suspend" sudo mkdir -p /etc/limine-entry-tool.d echo 'KERNEL_CMDLINE[default]+=" rtc_cmos.use_acpi_alarm=1"' | sudo tee "$LIMINE_DROP_IN" >/dev/null - $NO_REBUILD || sudo tee -a /etc/default/limine < "$LIMINE_DROP_IN" >/dev/null fi fi diff --git a/bin/omarchy-install b/bin/omarchy-install deleted file mode 100755 index e3267431..00000000 --- a/bin/omarchy-install +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -# omarchy:summary=Online Omarchy install (on an existing Arch system) -# omarchy:group=install - -set -eEo pipefail - -# Online entry point. The ISO install is driven by omarchy-iso's Python -# orchestrator instead, which arch-chroots into /mnt and runs finalize.sh -# directly — never touches this script. -exec bash "${OMARCHY_PATH:-/usr/share/omarchy}/install.sh" "$@" diff --git a/bin/omarchy-install-gaming-battlenet b/bin/omarchy-install-gaming-battlenet index a47b350b..5df49955 100755 --- a/bin/omarchy-install-gaming-battlenet +++ b/bin/omarchy-install-gaming-battlenet @@ -63,12 +63,9 @@ EOF launched_installer=1 fi -mkdir -p "$HOME/.local/share/applications" "$HOME/.local/share/icons/hicolor/48x48/apps" +mkdir -p "$HOME/.local/share/applications" install -m 644 "$OMARCHY_PATH/applications/battlenet.desktop" \ "$HOME/.local/share/applications/battlenet.desktop" -install -m 644 "$OMARCHY_PATH/applications/icons/Battle.net.png" \ - "$HOME/.local/share/icons/hicolor/48x48/apps/Battle.net.png" -gtk-update-icon-cache "$HOME/.local/share/icons/hicolor" &>/dev/null || true update-desktop-database "$HOME/.local/share/applications" 2>/dev/null || true if (( launched_installer )); then diff --git a/bin/omarchy-install-mode b/bin/omarchy-install-mode deleted file mode 100755 index e3a4fb48..00000000 --- a/bin/omarchy-install-mode +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -# omarchy:summary=Print the OMARCHY_INSTALL_MODE in the current env -# omarchy:group=install - -# install.sh exports this during the install flow. Not persisted post-install, -# so this prints 'unknown' outside the installer. -echo "${OMARCHY_INSTALL_MODE:-unknown}" diff --git a/bin/omarchy-install-service-sunshine b/bin/omarchy-install-service-sunshine index 474ae2e9..c215584b 100755 --- a/bin/omarchy-install-service-sunshine +++ b/bin/omarchy-install-service-sunshine @@ -13,8 +13,6 @@ SUNSHINE_ADMIN_APP="Sunshine Admin" SUNSHINE_ADMIN_URL="https://localhost:47990" SUNSHINE_ADMIN_EXEC="omarchy-launch-webapp $SUNSHINE_ADMIN_URL --ignore-certificate-errors" SUNSHINE_ICON_SOURCE="/usr/share/sunshine/web/images/logo-sunshine-45.png" -SUNSHINE_ICON_NAME="Sunshine Admin.png" -WEBAPP_ICON_DIR="$HOME/.local/share/applications/icons" HYPR_AUTOSTART_FILE="$HOME/.config/hypr/autostart.lua" HYPR_AUTOSTART_ENTRY='o.launch_on_start("sunshine")' @@ -59,9 +57,7 @@ open_ufw_ports() { } install_admin_webapp() { - mkdir -p "$WEBAPP_ICON_DIR" - cp "$SUNSHINE_ICON_SOURCE" "$WEBAPP_ICON_DIR/$SUNSHINE_ICON_NAME" - omarchy-webapp-install "$SUNSHINE_ADMIN_APP" "$SUNSHINE_ADMIN_URL" "$SUNSHINE_ICON_NAME" "$SUNSHINE_ADMIN_EXEC" + omarchy-webapp-install "$SUNSHINE_ADMIN_APP" "$SUNSHINE_ADMIN_URL" "$SUNSHINE_ICON_SOURCE" "$SUNSHINE_ADMIN_EXEC" } enable_hyprland_autostart() { diff --git a/bin/omarchy-migrate b/bin/omarchy-migrate index 4ba325be..10d4d57c 100755 --- a/bin/omarchy-migrate +++ b/bin/omarchy-migrate @@ -1,28 +1,19 @@ #!/bin/bash -# omarchy:summary=Run all pending migrations to bring the system in line with the installed version. +# omarchy:summary=Run pending Omarchy migrations for the current user. + +set -euo pipefail STATE_DIR="$HOME/.local/state/omarchy/migrations" mkdir -p "$STATE_DIR" -# Skipped migrations are tracked separately -mkdir -p "$STATE_DIR/skipped" - -# Run any pending migrations -for file in $OMARCHY_PATH/migrations/*.sh; do +for file in "$OMARCHY_PATH"/migrations/*.sh; do + [[ -f $file ]] || continue filename=$(basename "$file") - if [[ ! -f $STATE_DIR/$filename && ! -f $STATE_DIR/skipped/$filename ]]; then + if [[ ! -f $STATE_DIR/$filename ]]; then echo -e "\e[32m\nRunning migration (${filename%.sh})\e[0m" - - if bash $file; then - touch "$STATE_DIR/$filename" - else - if gum confirm "Migration ${filename%.sh} failed. Skip and continue?"; then - touch "$STATE_DIR/skipped/$filename" - else - exit 1 - fi - fi + bash "$file" + touch "$STATE_DIR/$filename" fi done diff --git a/bin/omarchy-refresh-applications b/bin/omarchy-refresh-applications index b95bb9e0..875a7426 100755 --- a/bin/omarchy-refresh-applications +++ b/bin/omarchy-refresh-applications @@ -1,10 +1,6 @@ #!/bin/bash -# omarchy:summary=Ensure all default .desktop, web apps, TUIs, and mise wrappers are installed. - -mkdir -p ~/.local/share/icons/hicolor/48x48/apps/ -cp "$OMARCHY_PATH"/applications/icons/*.png ~/.local/share/icons/hicolor/48x48/apps/ -gtk-update-icon-cache ~/.local/share/icons/hicolor &>/dev/null +# omarchy:summary=Ensure default application launchers and mise wrappers are installed. # Copy .desktop declarations mkdir -p ~/.local/share/applications @@ -14,10 +10,8 @@ if omarchy-cmd-present alacritty; then cp "$OMARCHY_PATH/default/alacritty/Alacritty.desktop" ~/.local/share/applications/ fi -# Refresh the webapps, TUIs, and mise wrappers -bash "$OMARCHY_PATH/install/packaging/icons.sh" -bash "$OMARCHY_PATH/install/packaging/webapps.sh" -bash "$OMARCHY_PATH/install/packaging/tuis.sh" -bash "$OMARCHY_PATH/install/packaging/mise.sh" +if [[ -f "$OMARCHY_PATH/install/user/mise.sh" ]]; then + bash "$OMARCHY_PATH/install/user/mise.sh" +fi update-desktop-database ~/.local/share/applications diff --git a/bin/omarchy-reinstall b/bin/omarchy-reinstall index d214188a..e46a6420 100755 --- a/bin/omarchy-reinstall +++ b/bin/omarchy-reinstall @@ -5,12 +5,9 @@ set -e -# Attempt to reinstall all default Omarchy packages and reset all the default configs. +echo -e "This will reinstall all default Omarchy packages and reset default configs.\nWarning: user config changes will be overwritten.\n" -echo -e "This will reinstall all the default Omarchy packages and reset all default configs.\nWarning: All user changes to configs will be lost.\n" - -if gum confirm "Are you sure you want to reinstall and lose all config changes?"; then - omarchy-reinstall-git +if gum confirm "Are you sure you want to reinstall and lose config changes?"; then omarchy-reinstall-pkgs omarchy-reinstall-configs diff --git a/bin/omarchy-reinstall-configs b/bin/omarchy-reinstall-configs index ade902bd..212358b4 100755 --- a/bin/omarchy-reinstall-configs +++ b/bin/omarchy-reinstall-configs @@ -5,24 +5,18 @@ set -e -# Overwrite all user configs with the Omarchy defaults. - if (( EUID == 0 )); then echo "Error: This script should not be run as root" exit 1 fi echo "Resetting all Omarchy configs" -cp -R $OMARCHY_PATH/config/* ~/.config/ -cp $OMARCHY_PATH/default/bashrc ~/.bashrc -echo '[[ -f ~/.bashrc ]] && . ~/.bashrc' | tee ~/.bash_profile >/dev/null - -env OMARCHY_PATH="$OMARCHY_PATH" OMARCHY_INSTALL_MODE=online bash -c ' - source "$OMARCHY_PATH/install/helpers/mode.sh" - detect_install_mode - source "$OMARCHY_PATH/install/config/theme-user.sh" -' - +omarchy-setup-user --force omarchy-refresh-limine omarchy-refresh-plymouth -omarchy-nvim-setup + +if omarchy-cmd-present omarchy-nvim-refresh; then + omarchy-nvim-refresh +elif omarchy-cmd-present omarchy-nvim-setup; then + omarchy-nvim-setup --force +fi diff --git a/bin/omarchy-reinstall-git b/bin/omarchy-reinstall-git deleted file mode 100755 index c62797c1..00000000 --- a/bin/omarchy-reinstall-git +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -# omarchy:summary=Reinstall the stable Omarchy source directory from git - -set -e - -# Reinstall the Omarchy configuration directory from the git source. - -git clone --depth=1 --branch master "https://github.com/basecamp/omarchy.git" ~/.local/share/omarchy-new >/dev/null -mv $OMARCHY_PATH ~/.local/share/omarchy-old -mv ~/.local/share/omarchy-new $OMARCHY_PATH diff --git a/bin/omarchy-remove-gaming-battlenet b/bin/omarchy-remove-gaming-battlenet index 6b311b41..9a7f6b91 100755 --- a/bin/omarchy-remove-gaming-battlenet +++ b/bin/omarchy-remove-gaming-battlenet @@ -12,9 +12,7 @@ sleep 1 rm -rf "$PREFIX" rm -f "$HOME/.local/share/applications/battlenet.desktop" -rm -f "$HOME/.local/share/icons/hicolor/48x48/apps/Battle.net.png" rm -f "$HOME/.cache/omarchy/Battle.net-Setup.exe" -gtk-update-icon-cache "$HOME/.local/share/icons/hicolor" &>/dev/null || true update-desktop-database "$HOME/.local/share/applications" 2>/dev/null || true echo diff --git a/bin/omarchy-setup-hardware b/bin/omarchy-setup-hardware new file mode 100755 index 00000000..4c66395b --- /dev/null +++ b/bin/omarchy-setup-hardware @@ -0,0 +1,62 @@ +#!/bin/bash + +# omarchy:summary=Apply Omarchy hardware-specific packages and system configuration +# omarchy:group=setup +# omarchy:requires-sudo=true +# omarchy:examples=omarchy setup hardware --install-user dhh + +set -euo pipefail + +usage() { + cat <&2 + usage >&2 + exit 1 + ;; + esac +done + +if (( EUID != 0 )); then + echo "Error: omarchy-setup-hardware must run as root" >&2 + exit 1 +fi + +if [[ -z $install_user || $install_user == "root" ]]; then + echo "Error: --install-user must name the target non-root user" >&2 + exit 1 +fi + +if ! getent passwd "$install_user" >/dev/null; then + echo "Error: user '$install_user' does not exist" >&2 + exit 1 +fi + +export OMARCHY_INSTALL_USER="$install_user" +export OMARCHY_PATH="${OMARCHY_PATH:-/usr/share/omarchy}" +export OMARCHY_INSTALL="${OMARCHY_INSTALL:-$OMARCHY_PATH/install}" +export OMARCHY_INSTALL_LOG_FILE="${OMARCHY_INSTALL_LOG_FILE:-/var/log/omarchy-install.log}" +export PATH="$OMARCHY_PATH/bin:$PATH" + +source "$OMARCHY_INSTALL/helpers/logging.sh" +source "$OMARCHY_INSTALL/helpers/chroot.sh" +source "$OMARCHY_INSTALL/hardware/all.sh" diff --git a/bin/omarchy-setup-system b/bin/omarchy-setup-system new file mode 100755 index 00000000..eb2c1c87 --- /dev/null +++ b/bin/omarchy-setup-system @@ -0,0 +1,94 @@ +#!/bin/bash + +# omarchy:summary=Apply Omarchy system setup in the installed target +# omarchy:group=setup +# omarchy:requires-sudo=true +# omarchy:examples=omarchy setup system --install-user dhh --first-install + +set -euo pipefail + +usage() { + cat <&2 + usage >&2 + exit 1 + ;; + esac +done + +if (( EUID != 0 )); then + echo "Error: omarchy-setup-system must run as root" >&2 + exit 1 +fi + +if [[ -z $install_user || $install_user == "root" ]]; then + echo "Error: --install-user must name the target non-root user" >&2 + exit 1 +fi + +if ! getent passwd "$install_user" >/dev/null; then + echo "Error: user '$install_user' does not exist" >&2 + exit 1 +fi + +export OMARCHY_INSTALL_USER="$install_user" +export OMARCHY_FIRST_INSTALL="$first_install" +export OMARCHY_UPGRADE="$upgrade" +export OMARCHY_PATH="${OMARCHY_PATH:-/usr/share/omarchy}" +export OMARCHY_INSTALL="${OMARCHY_INSTALL:-$OMARCHY_PATH/install}" +export OMARCHY_INSTALL_LOG_FILE="${OMARCHY_INSTALL_LOG_FILE:-/var/log/omarchy-install.log}" +export PATH="$OMARCHY_PATH/bin:$PATH" + +source "$OMARCHY_INSTALL/helpers/logging.sh" +source "$OMARCHY_INSTALL/helpers/chroot.sh" +start_install_log + +run_logged "$OMARCHY_INSTALL/config/theme-system.sh" +run_logged "$OMARCHY_INSTALL/config/increase-lockout-limit.sh" +run_logged "$OMARCHY_INSTALL/config/lockscreen-pam.sh" +run_logged "$OMARCHY_INSTALL/config/fix-powerprofilesctl-shebang.sh" +run_logged "$OMARCHY_INSTALL/config/docker.sh" +run_logged "$OMARCHY_INSTALL/config/enable-services.sh" +run_logged "$OMARCHY_INSTALL/config/firewall.sh" + +omarchy-setup-hardware --install-user "$install_user" + +run_logged "$OMARCHY_INSTALL/login/sddm.sh" + +run_logged "$OMARCHY_INSTALL/post-install/dns-resolver.sh" +run_logged "$OMARCHY_INSTALL/post-install/pacman.sh" +run_logged "$OMARCHY_INSTALL/post-install/udev.sh" +run_logged "$OMARCHY_INSTALL/post-install/localdb.sh" + +stop_install_log diff --git a/bin/omarchy-setup-user b/bin/omarchy-setup-user index 96c5971d..f4651d10 100755 --- a/bin/omarchy-setup-user +++ b/bin/omarchy-setup-user @@ -6,28 +6,51 @@ set -euo pipefail +usage() { + cat <&2 exit 1 fi force=0 -if [[ ${1:-} == "--force" ]]; then - force=1 -elif [[ ${1:-} == "-h" || ${1:-} == "--help" ]]; then - cat <&2 + usage >&2 + exit 1 + ;; + esac +done state_dir="$HOME/.local/state/omarchy" marker="$state_dir/setup-user.done" @@ -40,15 +63,11 @@ fi export OMARCHY_PATH="${OMARCHY_PATH:-/usr/share/omarchy}" export OMARCHY_INSTALL="${OMARCHY_INSTALL:-$OMARCHY_PATH/install}" +export OMARCHY_SETUP_CONTEXT="${OMARCHY_SETUP_CONTEXT:-runtime}" export PATH="$OMARCHY_PATH/bin:$PATH" -if [[ -f $OMARCHY_INSTALL/helpers/mode.sh ]]; then - source "$OMARCHY_INSTALL/helpers/mode.sh" - detect_install_mode - export_legacy_mode_flags -else - install_mode_is() { [[ ${OMARCHY_INSTALL_MODE:-online} == "$1" ]]; } - export -f install_mode_is +if (( first_install )); then + export OMARCHY_SETUP_CONTEXT=iso-chroot fi if [[ -n ${OMARCHY_INSTALL_LOG_FILE:-} && -f $OMARCHY_INSTALL/helpers/logging.sh ]]; then @@ -60,38 +79,60 @@ else } fi -# Copy over Omarchy configs for this user. /etc/skel handles newly-created -# users, but existing users installing Omarchy need the same defaults seeded. +omarchy_user_systemctl_enable() { + local unit="$1" unit_path target + local -a targets=() + + if systemctl --user enable "$unit" >/dev/null 2>&1; then + return 0 + fi + + # ISO chroot setup has no running user systemd manager. Enabling a user unit + # is just creating the [Install] WantedBy symlinks, so do that directly. + unit_path="$HOME/.config/systemd/user/$unit" + if [[ -f $unit_path ]]; then + mapfile -t targets < <(awk -F= ' + /^\[Install\]/ { in_install=1; next } + /^\[/ { in_install=0 } + in_install && $1 == "WantedBy" { + n=split($2, values, /[[:space:]]+/) + for (i = 1; i <= n; i++) if (values[i] != "") print values[i] + } + ' "$unit_path") + fi + ((${#targets[@]})) || targets=(default.target) + + for target in "${targets[@]}"; do + mkdir -p "$HOME/.config/systemd/user/$target.wants" + ln -sfn "../$unit" "$HOME/.config/systemd/user/$target.wants/$unit" + done +} +export -f omarchy_user_systemctl_enable + mkdir -p ~/.config cp -R "$OMARCHY_PATH/config/." ~/.config/ cp "$OMARCHY_PATH/default/bashrc" ~/.bashrc echo '[[ -f ~/.bashrc ]] && . ~/.bashrc' > ~/.bash_profile -# AI assistant skill symlinks. Each agent has its own conventional skills -# directory; we drop an 'omarchy' entry into each so the skill is loaded. mkdir -p ~/.agents/skills ~/.claude/skills ~/.codex/skills ~/.pi/agent/skills ln -sfn "$OMARCHY_PATH/default/omarchy-skill" ~/.agents/skills/omarchy ln -sfn "$OMARCHY_PATH/default/omarchy-skill" ~/.claude/skills/omarchy ln -sfn "$OMARCHY_PATH/default/omarchy-skill" ~/.codex/skills/omarchy ln -sfn "$OMARCHY_PATH/default/omarchy-skill" ~/.pi/agent/skills/omarchy -# Toggle state and flags mkdir -p ~/.local/state/omarchy/toggles/hypr cp "$OMARCHY_PATH/default/hypr/toggles/flags.lua" ~/.local/state/omarchy/toggles/hypr/ -# Nautilus python extensions mkdir -p "$HOME/.local/share/nautilus-python/extensions" cp "$OMARCHY_PATH/default/nautilus-python/extensions/localsend.py" \ "$HOME/.local/share/nautilus-python/extensions/" cp "$OMARCHY_PATH/default/nautilus-python/extensions/transcode.py" \ "$HOME/.local/share/nautilus-python/extensions/" -# Branding (fastfetch about + screensaver text) mkdir -p ~/.config/omarchy/branding cp "$OMARCHY_PATH/icon.txt" ~/.config/omarchy/branding/about.txt cp "$OMARCHY_PATH/logo.txt" ~/.config/omarchy/branding/screensaver.txt -# XDG user dirs (folder layout, gtk bookmarks) mkdir -p ~/Downloads ~/Pictures ~/Videos ~/.config/gtk-3.0 xdg-user-dirs-update --set TEMPLATES "$HOME" xdg-user-dirs-update --set PUBLICSHARE "$HOME" @@ -103,7 +144,6 @@ for dir in Downloads Projects Pictures Videos; do grep -qxF "$bookmark" ~/.config/gtk-3.0/bookmarks || echo "$bookmark" >>~/.config/gtk-3.0/bookmarks done -# Hyprland keyboard layout from /etc/vconsole.conf conf=/etc/vconsole.conf hyprlua="$HOME/.config/hypr/input.lua" if [[ -f $conf && -f $hyprlua ]]; then @@ -120,15 +160,18 @@ if [[ -f $conf && -f $hyprlua ]]; then fi fi -# Reusable per-user install phase: theme, shell/user services, default keyring, -# hardware-specific user session fixes, and other current-user setup. source "$OMARCHY_INSTALL/user/all.sh" -# Application catalog + MIME defaults. Run after mise/node setup from user/all -# so npm-backed wrappers can be installed for each user. omarchy-refresh-applications xdg-settings set default-web-browser chromium.desktop xdg-mime default HEY.desktop x-scheme-handler/mailto +if (( first_install )); then + mkdir -p "$state_dir/migrations" + for migration in "$OMARCHY_PATH"/migrations/*.sh; do + [[ -f $migration ]] && touch "$state_dir/migrations/$(basename "$migration")" + done +fi + touch "$marker" echo "User setup complete." diff --git a/bin/omarchy-system-sleep-monitor b/bin/omarchy-system-sleep-monitor index 37e7ca92..bd343b01 100755 --- a/bin/omarchy-system-sleep-monitor +++ b/bin/omarchy-system-sleep-monitor @@ -7,11 +7,13 @@ monitor_command='exec dbus-monitor --system "type='\''signal'\'',sender='\''org.freedesktop.login1'\'',interface='\''org.freedesktop.login1.Manager'\'',member='\''PrepareForSleep'\''"' consume_sleep_events() { - local line + local line sleep_lock + sleep_lock=$(command -v omarchy-system-sleep-lock || true) + sleep_lock=${sleep_lock:-/usr/bin/omarchy-system-sleep-lock} while IFS= read -r line; do if [[ $line == *"boolean true"* ]]; then - "$OMARCHY_PATH/bin/omarchy-system-sleep-lock" + "$sleep_lock" exit 0 fi done @@ -22,9 +24,12 @@ if [[ ${1:-} == "--consume" ]]; then exit 0 fi +sleep_monitor=$(command -v omarchy-system-sleep-monitor || true) +sleep_monitor=${sleep_monitor:-/usr/bin/omarchy-system-sleep-monitor} + exec systemd-inhibit \ --what=sleep \ --mode=delay \ --who=Omarchy \ --why="Lock screen before suspend" \ - bash -lc "$monitor_command | \"$OMARCHY_PATH/bin/omarchy-system-sleep-monitor\" --consume" + bash -lc "$monitor_command | \"$sleep_monitor\" --consume" diff --git a/bin/omarchy-theme-set b/bin/omarchy-theme-set index 2d39e152..01f86041 100755 --- a/bin/omarchy-theme-set +++ b/bin/omarchy-theme-set @@ -110,6 +110,10 @@ set_theme_background() { } THEME_NAME=$(echo "$1" | sed -E 's/<[^>]+>//g' | tr '[:upper:]' '[:lower:]' | tr ' ' '-') +THEME_HEADLESS=0 +if [[ ${OMARCHY_THEME_HEADLESS:-} == "1" || ${OMARCHY_THEME_OFFLINE:-} == "1" ]]; then + THEME_HEADLESS=1 +fi if [[ ! -d $OMARCHY_THEMES_PATH/$THEME_NAME ]] && [[ ! -d $USER_THEMES_PATH/$THEME_NAME ]]; then echo "Theme '$THEME_NAME' does not exist" @@ -139,7 +143,7 @@ fi omarchy-theme-set-templates OLD_BACKGROUND_SNAPSHOT="" -if [[ $OMARCHY_THEME_SKIP_BACKGROUND != "1" ]]; then +if [[ $THEME_HEADLESS != "1" && $OMARCHY_THEME_SKIP_BACKGROUND != "1" ]]; then OLD_BACKGROUND_SNAPSHOT=$(snapshot_current_background) fi @@ -154,7 +158,7 @@ echo "$THEME_NAME" >"$HOME/.config/omarchy/current/theme.name" # the theme hooks run. colors_payload=$([[ -f $CURRENT_THEME_PATH/colors.toml ]] && base64 -w 0 "$CURRENT_THEME_PATH/colors.toml") shell_payload=$([[ -f $CURRENT_THEME_PATH/shell.toml ]] && base64 -w 0 "$CURRENT_THEME_PATH/shell.toml") -if [[ ${OMARCHY_THEME_OFFLINE:-} == "1" ]]; then +if [[ $THEME_HEADLESS == "1" ]]; then : # No shell/session bus exists during ISO chroot finalization. elif [[ $OMARCHY_THEME_SKIP_BACKGROUND == "1" ]]; then shell_ipc shell applyTheme "$colors_payload" "$shell_payload" || true @@ -183,7 +187,7 @@ post_theme_commands=( omarchy-theme-set-keyboard ) -if [[ ${OMARCHY_THEME_OFFLINE:-} != "1" ]]; then +if [[ $THEME_HEADLESS != "1" ]]; then run_parallel "${post_theme_commands[@]}" # Call hook on theme set diff --git a/bin/omarchy-tui-install b/bin/omarchy-tui-install index d529b54f..2ddb0778 100755 --- a/bin/omarchy-tui-install +++ b/bin/omarchy-tui-install @@ -1,40 +1,76 @@ #!/bin/bash # omarchy:summary=Create a desktop launcher for a terminal UI app -# omarchy:args=[name command window-style icon-url] +# omarchy:args=[name command window-style icon-url-or-name] set -e +ICON_DIR="$HOME/.local/share/icons/hicolor/256x256/apps" + +safe_icon_name() { + printf '%s\n' "$1" \ + | tr '[:upper:]' '[:lower:]' \ + | sed 's/[^[:alnum:]]\+/-/g; s/^-//; s/-$//' +} + +icon_name_from_ref() { + local ref="$1" + local name + name=$(basename "$ref") + + if [[ $name == *.* ]]; then + safe_icon_name "${name%.*}" + else + printf '%s\n' "$name" + fi +} + +install_user_icon() { + local source="$1" + local name="$2" + local ext="${source##*.}" + + [[ $ext == "$source" ]] && ext="png" + mkdir -p "$ICON_DIR" + cp "$source" "$ICON_DIR/$name.$ext" + gtk-update-icon-cache "$HOME/.local/share/icons/hicolor" &>/dev/null || true + printf '%s\n' "$name" +} + if (( $# != 4 )); then echo -e "\e[32mLet's create a TUI shortcut you can start with the app launcher.\n\e[0m" APP_NAME=$(gum input --prompt "Name> " --placeholder "My TUI") APP_EXEC=$(gum input --prompt "Launch Command> " --placeholder "lazydocker or bash -c 'dust; read -n 1 -s'") WINDOW_STYLE=$(gum choose --header "Window style" float tile) - ICON_URL=$(gum input --prompt "Icon URL> " --placeholder "See https://dashboardicons.com (must use PNG or SVG!)") + ICON_REF=$(gum input --prompt "Icon URL/name> " --placeholder "See https://dashboardicons.com or enter an installed icon name") else APP_NAME="$1" APP_EXEC="$2" WINDOW_STYLE="$3" - ICON_URL="$4" + ICON_REF="$4" fi -if [[ -z $APP_NAME || -z $APP_EXEC || -z $ICON_URL ]]; then - echo "You must set app name, app command, and icon URL!" +if [[ -z $APP_NAME || -z $APP_EXEC || -z $ICON_REF ]]; then + echo "You must set app name, app command, and icon URL/name!" exit 1 fi -ICON_DIR="$HOME/.local/share/applications/icons" DESKTOP_FILE="$HOME/.local/share/applications/$APP_NAME.desktop" +mkdir -p "$(dirname "$DESKTOP_FILE")" -if [[ ! $ICON_URL =~ ^https?:// ]] && [[ -f $ICON_URL ]]; then - ICON_PATH="$ICON_URL" -else - ICON_PATH="$ICON_DIR/$APP_NAME.png" +if [[ $ICON_REF =~ ^https?:// ]]; then + ICON_VALUE=$(safe_icon_name "$APP_NAME") mkdir -p "$ICON_DIR" - if ! curl -sL -o "$ICON_PATH" "$ICON_URL"; then + if ! curl -sL -o "$ICON_DIR/$ICON_VALUE.png" "$ICON_REF"; then echo "Error: Failed to download icon." exit 1 fi + gtk-update-icon-cache "$HOME/.local/share/icons/hicolor" &>/dev/null || true +elif [[ -f $ICON_REF ]]; then + ICON_VALUE=$(install_user_icon "$ICON_REF" "$(safe_icon_name "$APP_NAME")") +else + # Bundled Omarchy icons are package-owned under /usr/share/icons/hicolor. + ICON_VALUE=$(icon_name_from_ref "$ICON_REF") fi if [[ $WINDOW_STYLE == "float" ]]; then @@ -51,7 +87,7 @@ Comment=$APP_NAME Exec=xdg-terminal-exec --app-id=$APP_CLASS -e $APP_EXEC Terminal=false Type=Application -Icon=$ICON_PATH +Icon=$ICON_VALUE StartupNotify=true EOF diff --git a/bin/omarchy-tui-remove b/bin/omarchy-tui-remove index 4d527dae..c2c39d07 100755 --- a/bin/omarchy-tui-remove +++ b/bin/omarchy-tui-remove @@ -5,7 +5,8 @@ set -e -ICON_DIR="$HOME/.local/share/applications/icons" +ICON_DIR="$HOME/.local/share/icons/hicolor/256x256/apps" +OLD_ICON_DIR="$HOME/.local/share/applications/icons" DESKTOP_DIR="$HOME/.local/share/applications/" if (( $# == 0 )); then @@ -32,6 +33,7 @@ if [[ -z $APP_NAME ]]; then exit 1 fi +icon_name=$(printf '%s\n' "$APP_NAME" | tr '[:upper:]' '[:lower:]' | sed 's/[^[:alnum:]]\+/-/g; s/^-//; s/-$//') rm -f "$DESKTOP_DIR/$APP_NAME.desktop" -rm -f "$ICON_DIR/$APP_NAME.png" +rm -f "$ICON_DIR/$icon_name.png" "$ICON_DIR/$APP_NAME.png" "$OLD_ICON_DIR/$APP_NAME.png" omarchy-notification-send -g  "TUI removed" "$APP_NAME" diff --git a/bin/omarchy-tui-remove-all b/bin/omarchy-tui-remove-all index 7f1c11f0..f947a198 100755 --- a/bin/omarchy-tui-remove-all +++ b/bin/omarchy-tui-remove-all @@ -5,7 +5,8 @@ set -e APP_DIR="${1:-$HOME/.local/share/applications}" -ICON_DIR="$HOME/.local/share/applications/icons" +ICON_DIR="$HOME/.local/share/icons/hicolor/256x256/apps" +OLD_ICON_DIR="$HOME/.local/share/applications/icons" echo "Scanning for TUIs in $APP_DIR..." @@ -23,9 +24,10 @@ fi for file in "${tui_desktop_files[@]}"; do app_name=$(basename "$file" .desktop) + icon_name=$(printf '%s\n' "$app_name" | tr '[:upper:]' '[:lower:]' | sed 's/[^[:alnum:]]\+/-/g; s/^-//; s/-$//') echo "Removing TUI: $app_name" rm -f "$file" - rm -f "$ICON_DIR/$app_name.png" + rm -f "$ICON_DIR/$icon_name.png" "$ICON_DIR/$app_name.png" "$OLD_ICON_DIR/$app_name.png" done if command -v update-desktop-database &>/dev/null; then diff --git a/bin/omarchy-update b/bin/omarchy-update index f1ca5bc0..e726a8e5 100755 --- a/bin/omarchy-update +++ b/bin/omarchy-update @@ -7,8 +7,6 @@ set -e -# Run the update inside a PTY so pacman/yay keep showing download progress -# while still logging the full session for later analysis. if [[ -z $OMARCHY_UPDATE_LOGGED ]]; then script_command=$(printf '%q ' "$0" "$@") exec env OMARCHY_UPDATE_LOGGED=1 script -qefc "$script_command" "/tmp/omarchy-update.log" @@ -16,8 +14,7 @@ fi trap 'echo ""; echo -e "\033[0;31mSomething went wrong during the update!\n\nPlease review the output above carefully, correct the error, and retry the update.\n\nIf you need assistance, get help from the community at https://omarchy.org/discord\033[0m"' ERR -if [[ $1 == "-y" ]] || omarchy-update-confirm; then +if [[ ${1:-} == "-y" ]] || omarchy-update-confirm; then omarchy-snapshot create || (($? == 127)) - omarchy-update-git omarchy-update-perform fi diff --git a/bin/omarchy-update-available b/bin/omarchy-update-available index 92c57adc..5aebfa0a 100755 --- a/bin/omarchy-update-available +++ b/bin/omarchy-update-available @@ -1,24 +1,15 @@ #!/bin/bash -# omarchy:summary=Get remote tag +# omarchy:summary=Check whether the Omarchy package has an available update. -latest_tag=$(git -C "$OMARCHY_PATH" ls-remote --tags origin | grep -v "{}" | awk '{print $2}' | sed 's#refs/tags/##' | sort -V | tail -n 1) -if [[ -z $latest_tag ]]; then - echo "Error: Could not retrieve latest tag." - exit 1 -fi +set -e -# Get local tag -current_tag=$(git -C "$OMARCHY_PATH" describe --tags $(git -C "$OMARCHY_PATH" rev-list --tags --max-count=1)) -if [[ -z $current_tag ]]; then - echo "Error: Could not retrieve current tag." - exit 1 -fi - -if [[ $current_tag != $latest_tag ]]; then - echo "Omarchy update available ($latest_tag)" +if pacman -Qu omarchy >/tmp/omarchy-update-available.$$ 2>/dev/null; then + cat /tmp/omarchy-update-available.$$ + rm -f /tmp/omarchy-update-available.$$ exit 0 -else - echo "Omarchy is up to date ($current_tag)" - exit 1 fi + +rm -f /tmp/omarchy-update-available.$$ +echo "Omarchy is up to date" +exit 1 diff --git a/bin/omarchy-update-branch b/bin/omarchy-update-branch deleted file mode 100755 index fa294b63..00000000 --- a/bin/omarchy-update-branch +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash - -# omarchy:summary=Switch Omarchy branches and update from the selected branch -# omarchy:args= - -set -e - -if (($# == 0)); then - echo "Usage: omarchy-update-branch [master|dev]" - exit 1 -fi - -branch="$1" - -# Snapshot before switching branch -omarchy-snapshot create || (( $? == 127 )) - -if ! git -C "$OMARCHY_PATH" diff --quiet || ! git -C "$OMARCHY_PATH" diff --cached --quiet; then - stashed=true - git -C "$OMARCHY_PATH" stash push -u -m "Autostash before switching to $branch" -else - stashed=false -fi - -# Switch branches -git -C "$OMARCHY_PATH" switch "$branch" - -# Reapply stash if we made one -if [[ $stashed == "true" ]]; then - if ! git -C "$OMARCHY_PATH" stash pop; then - echo "⚠️ Conflicts when applying stash — stash kept" - fi -fi - -# Update the system from the new branch -omarchy-update-perform diff --git a/bin/omarchy-update-git b/bin/omarchy-update-git deleted file mode 100755 index 420ee379..00000000 --- a/bin/omarchy-update-git +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -# omarchy:summary=Pull the latest Omarchy git changes - -set -e - -echo -e "\e[32mUpdate Omarchy\e[0m" - -omarchy-update-time - -# Suppress Hyprland config errors while git updates default config files mid-pull -hyprctl keyword debug:suppress_errors true &>/dev/null || true -hyprctl eval 'hl.config({ debug = { suppress_errors = true } })' &>/dev/null || true - -git -C $OMARCHY_PATH pull --autostash -git -C $OMARCHY_PATH --no-pager diff --check || git -C $OMARCHY_PATH reset --merge - -hyprctl reload &>/dev/null || true diff --git a/bin/omarchy-version-branch b/bin/omarchy-version-branch deleted file mode 100755 index 898a71cd..00000000 --- a/bin/omarchy-version-branch +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -# omarchy:summary=Print the current Omarchy git branch - -echo $(git -C "$OMARCHY_PATH" rev-parse --abbrev-ref HEAD) diff --git a/bin/omarchy-webapp-install b/bin/omarchy-webapp-install index dbf00609..9d6abbf1 100755 --- a/bin/omarchy-webapp-install +++ b/bin/omarchy-webapp-install @@ -1,11 +1,41 @@ #!/bin/bash # omarchy:summary=Create a desktop launcher for a web app -# omarchy:args=[name url icon [custom-exec] [mime-types]] +# omarchy:args=[name url icon-url-or-name [custom-exec] [mime-types]] set -e -ICON_DIR="$HOME/.local/share/applications/icons" +ICON_DIR="$HOME/.local/share/icons/hicolor/256x256/apps" + +safe_icon_name() { + printf '%s\n' "$1" \ + | tr '[:upper:]' '[:lower:]' \ + | sed 's/[^[:alnum:]]\+/-/g; s/^-//; s/-$//' +} + +icon_name_from_ref() { + local ref="$1" + local name + name=$(basename "$ref") + + if [[ $name == *.* ]]; then + safe_icon_name "${name%.*}" + else + printf '%s\n' "$name" + fi +} + +install_user_icon() { + local source="$1" + local name="$2" + local ext="${source##*.}" + + [[ $ext == "$source" ]] && ext="png" + mkdir -p "$ICON_DIR" + cp "$source" "$ICON_DIR/$name.$ext" + gtk-update-icon-cache "$HOME/.local/share/icons/hicolor" &>/dev/null || true + printf '%s\n' "$name" +} if (( $# < 3 )); then echo -e "\e[32mLet's create a new web app you can start with the app launcher.\n\e[0m" @@ -18,10 +48,12 @@ if (( $# < 3 )); then # Try to fetch favicon automatically first. FAVICON_URL="https://www.google.com/s2/favicons?domain=${APP_URL}&sz=128" mkdir -p "$ICON_DIR" - if curl -fsSL -o "$ICON_DIR/$APP_NAME.png" "$FAVICON_URL" && [[ -s $ICON_DIR/$APP_NAME.png ]]; then - ICON_REF="$APP_NAME.png" + ICON_VALUE=$(safe_icon_name "$APP_NAME") + if curl -fsSL -o "$ICON_DIR/$ICON_VALUE.png" "$FAVICON_URL" && [[ -s $ICON_DIR/$ICON_VALUE.png ]]; then + gtk-update-icon-cache "$HOME/.local/share/icons/hicolor" &>/dev/null || true + ICON_REF="$ICON_VALUE" else - ICON_REF=$(gum input --prompt "Icon URL> " --placeholder "Could not fetch favicon automatically. Enter PNG icon URL (see https://dashboardicons.com)") + ICON_REF=$(gum input --prompt "Icon URL/name> " --placeholder "Could not fetch favicon automatically. Enter PNG icon URL or icon name") fi CUSTOM_EXEC="" @@ -45,21 +77,24 @@ if [[ -z $APP_NAME || -z $APP_URL ]]; then exit 1 fi -# Resolve icon from URL or from a local icon name. -mkdir -p "$ICON_DIR" - if [[ -z $ICON_REF ]]; then ICON_REF="https://www.google.com/s2/favicons?domain=${APP_URL}&sz=128" fi if [[ $ICON_REF =~ ^https?:// ]]; then - ICON_PATH="$ICON_DIR/$APP_NAME.png" - if ! curl -fsSL -o "$ICON_PATH" "$ICON_REF" || [[ ! -s $ICON_PATH ]]; then + ICON_VALUE=$(safe_icon_name "$APP_NAME") + mkdir -p "$ICON_DIR" + if ! curl -fsSL -o "$ICON_DIR/$ICON_VALUE.png" "$ICON_REF" || [[ ! -s $ICON_DIR/$ICON_VALUE.png ]]; then echo "Error: Failed to download icon." exit 1 fi + gtk-update-icon-cache "$HOME/.local/share/icons/hicolor" &>/dev/null || true +elif [[ -f $ICON_REF ]]; then + ICON_VALUE=$(install_user_icon "$ICON_REF" "$(safe_icon_name "$APP_NAME")") else - ICON_PATH="$ICON_DIR/$ICON_REF" + # Bundled Omarchy icons are package-owned under /usr/share/icons/hicolor. + # Accept either "HEY" or the historical "HEY.png" argument form. + ICON_VALUE=$(icon_name_from_ref "$ICON_REF") fi # Use custom exec if provided, otherwise default behavior @@ -67,6 +102,7 @@ EXEC_COMMAND="${CUSTOM_EXEC:-omarchy-launch-webapp $APP_URL}" # Create application .desktop file DESKTOP_FILE="$HOME/.local/share/applications/$APP_NAME.desktop" +mkdir -p "$(dirname "$DESKTOP_FILE")" cat >"$DESKTOP_FILE" </dev/null diff --git a/bin/omarchy-webapp-remove-all b/bin/omarchy-webapp-remove-all index 6b77f5ed..1754c4ee 100755 --- a/bin/omarchy-webapp-remove-all +++ b/bin/omarchy-webapp-remove-all @@ -5,7 +5,8 @@ set -e APP_DIR="${1:-$HOME/.local/share/applications}" -ICON_DIR="$HOME/.local/share/applications/icons" +ICON_DIR="$HOME/.local/share/icons/hicolor/256x256/apps" +OLD_ICON_DIR="$HOME/.local/share/applications/icons" echo "Scanning for web apps in $APP_DIR..." @@ -23,9 +24,10 @@ fi for file in "${webapp_desktop_files[@]}"; do app_name=$(basename "$file" .desktop) + icon_name=$(printf '%s\n' "$app_name" | tr '[:upper:]' '[:lower:]' | sed 's/[^[:alnum:]]\+/-/g; s/^-//; s/-$//') echo "Removing web app: $app_name" rm -f "$file" - rm -f "$ICON_DIR/$app_name.png" + rm -f "$ICON_DIR/$icon_name.png" "$ICON_DIR/$app_name.png" "$OLD_ICON_DIR/$app_name.png" done if command -v update-desktop-database &>/dev/null; then diff --git a/bin/omarchy-windows-vm b/bin/omarchy-windows-vm index 0549d9ac..67bf7a15 100755 --- a/bin/omarchy-windows-vm +++ b/bin/omarchy-windows-vm @@ -44,19 +44,14 @@ install_windows() { mkdir -p "$HOME/.windows" mkdir -p "$HOME/.config/windows" - mkdir -p "$HOME/.local/share/applications/icons" - - # Install Windows VM icon and desktop file - if [[ -f $OMARCHY_PATH/applications/icons/windows.png ]]; then - cp "$OMARCHY_PATH/applications/icons/windows.png" "$HOME/.local/share/applications/icons/windows.png" - fi + mkdir -p "$HOME/.local/share/applications" cat << EOF | tee "$HOME/.local/share/applications/windows-vm.desktop" > /dev/null [Desktop Entry] Name=Windows Comment=Start Windows VM via Docker and connect with RDP Exec=uwsm app -- omarchy-windows-vm launch -Icon=$HOME/.local/share/applications/icons/windows.png +Icon=windows Terminal=false Type=Application Categories=System;Virtualization; diff --git a/boot.sh b/boot.sh deleted file mode 100755 index d56f49ce..00000000 --- a/boot.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/bash -# Curl-able Omarchy bootstrap. Configures the omarchy pacman repo on a fresh -# Arch system, installs the omarchy-installer package (which pulls omarchy, -# omarchy-settings, and omarchy-limine via depends), then hands off to -# `omarchy install`. -# -# Usage: -# curl -sSL https://omarchy.org/boot.sh | bash -# curl -sSL https://omarchy.org/boot.sh | OMARCHY_REF=dev bash - -set -e - -ansi_art=' ▄▄▄ - ▄█████▄ ▄███████████▄ ▄███████ ▄███████ ▄███████ ▄█ █▄ ▄█ █▄ -███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ -███ ███ ███ ███ ███ ███ ███ ███ ███ ███ █▀ ███ ███ ███ ███ -███ ███ ███ ███ ███ ▄███▄▄▄███ ▄███▄▄▄██▀ ███ ▄███▄▄▄███▄ ███▄▄▄███ -███ ███ ███ ███ ███ ▀███▀▀▀███ ▀███▀▀▀▀ ███ ▀▀███▀▀▀███ ▀▀▀▀▀▀███ -███ ███ ███ ███ ███ ███ ███ ██████████ ███ █▄ ███ ███ ▄██ ███ -███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ - ▀█████▀ ▀█ ███ █▀ ███ █▀ ███ ███ ███████▀ ███ █▀ ▀█████▀ - ███ █▀ ' -clear -echo -e "\n$ansi_art\n" - -# Pick the omarchy package channel. stable is the default; dev/rc are for -# pre-release testing. -case "${OMARCHY_REF:-master}" in - dev) channel=edge ;; - rc) channel=rc ;; - *) channel=stable ;; -esac - -echo "Configuring omarchy [${channel}] pacman repo..." -sudo tee /etc/pacman.d/omarchy.conf >/dev/null </dev/null -fi - -echo "Refreshing pacman databases..." -sudo pacman -Sy --noconfirm - -echo "Installing omarchy-installer..." -# Only install the runner here — install.sh pulls the full omarchy runtime -# itself once it knows the mode and has logged in. -sudo pacman -S --noconfirm --needed omarchy-keyring omarchy-installer - -echo -e "\nInstallation starting..." -exec omarchy-install diff --git a/config/fastfetch/config.jsonc b/config/fastfetch/config.jsonc index ea6b59e1..86b05d01 100644 --- a/config/fastfetch/config.jsonc +++ b/config/fastfetch/config.jsonc @@ -68,12 +68,6 @@ "keyColor": "blue", "text": "version=$(omarchy-version); echo \"Omarchy $version\"" }, - { - "type": "command", - "key": "│ ├󰘬", - "keyColor": "blue", - "text": "branch=$(omarchy-version-branch); echo \"$branch\"" - }, { "type": "command", "key": "│ ├󰔫", diff --git a/config/mimeapps.list b/config/mimeapps.list index f10483f1..61079e82 100644 --- a/config/mimeapps.list +++ b/config/mimeapps.list @@ -12,10 +12,7 @@ application/pdf=org.gnome.Evince.desktop x-scheme-handler/http=chromium.desktop x-scheme-handler/https=chromium.desktop - -# Note: x-scheme-handler/mailto -> HEY.desktop is set at install time by -# install/config/mimetypes.sh because HEY.desktop is generated by -# install/packaging/webapps.sh, not shipped as a /etc/skel file. +x-scheme-handler/mailto=HEY.desktop video/mp4=mpv.desktop video/x-msvideo=mpv.desktop diff --git a/config/systemd/user/omarchy-sleep-lock.service b/config/systemd/user/omarchy-sleep-lock.service index 39113fbc..8bf696fe 100644 --- a/config/systemd/user/omarchy-sleep-lock.service +++ b/config/systemd/user/omarchy-sleep-lock.service @@ -5,7 +5,7 @@ Requires=dbus.socket [Service] Type=simple -ExecStart=%h/.local/share/omarchy/bin/omarchy-system-sleep-monitor +ExecStart=/usr/bin/omarchy-system-sleep-monitor Restart=always RestartSec=2 diff --git a/config/uwsm/env b/config/uwsm/env index 5986de5c..5abd2c7e 100644 --- a/config/uwsm/env +++ b/config/uwsm/env @@ -1,10 +1,9 @@ # Changes require a restart to take effect. # Source /etc/omarchy.conf so omarchy-dev-link (which writes -# OMARCHY_PATH= there) wins over the default. install.sh's -# script-mode export still wins because the file uses the same :- guard. -# UWSM doesn't source /etc/profile.d/, so this duplicates that logic for the -# Hyprland session. +# OMARCHY_PATH= there) wins over the packaged default. UWSM doesn't +# source /etc/profile.d/, so this duplicates that logic for the Hyprland +# session. [ -f /etc/omarchy.conf ] && . /etc/omarchy.conf export OMARCHY_PATH="${OMARCHY_PATH:-/usr/share/omarchy}" export PATH="$OMARCHY_PATH/bin:$PATH:$HOME/.local/bin" diff --git a/default/bash/envs b/default/bash/envs index 61c1d3dd..c202474b 100644 --- a/default/bash/envs +++ b/default/bash/envs @@ -7,8 +7,8 @@ export MANROFFOPT="-c" export MANPAGER="sh -c 'col -bx | bat -l man -p'" # Duplicated from .config/uwsm/env so SSH/non-login shells also see the -# override. /etc/omarchy.conf wins (omarchy-dev-link writes it); -# install.sh's script-mode export wins over that via the :- guard. +# override. /etc/omarchy.conf wins (omarchy-dev-link writes it); otherwise +# the packaged runtime under /usr/share/omarchy is used. [ -f /etc/omarchy.conf ] && . /etc/omarchy.conf export OMARCHY_PATH="${OMARCHY_PATH:-/usr/share/omarchy}" export PATH="$OMARCHY_PATH/bin:$PATH:$HOME/.local/bin" diff --git a/default/limine/default.conf b/default/limine/default.conf index 9beedcd4..3f3ea0a8 100644 --- a/default/limine/default.conf +++ b/default/limine/default.conf @@ -1,20 +1,3 @@ -TARGET_OS_NAME="Omarchy" - ESP_PATH="/boot" KERNEL_CMDLINE[default]+="@@CMDLINE@@" -KERNEL_CMDLINE[default]+=" quiet splash loglevel=0 systemd.show_status=false rd.udev.log_level=0 vt.global_cursor_default=0" - -ENABLE_UKI=yes -CUSTOM_UKI_NAME="omarchy" - -ENABLE_LIMINE_FALLBACK=yes - -# Find and add other bootloaders -FIND_BOOTLOADERS=yes - -BOOT_ORDER="*, *fallback, Snapshots" - -MAX_SNAPSHOT_ENTRIES=5 - -SNAPSHOT_FORMAT_CHOICE=5 diff --git a/default/omarchy-skill/SKILL.md b/default/omarchy-skill/SKILL.md index bb35d3e9..193c205c 100644 --- a/default/omarchy-skill/SKILL.md +++ b/default/omarchy-skill/SKILL.md @@ -8,7 +8,7 @@ description: > blur, opacity, omarchy-shell, bar, terminal config, themes, background, night light, idle, lock screen, screenshots, reminders, layer rules, workspace settings, display config, and user-facing omarchy commands. Excludes Omarchy - source development in ~/.local/share/omarchy/ and `omarchy dev` workflows. + source development through `omarchy dev link` workflows. --- # Omarchy Skill @@ -34,11 +34,11 @@ It is not for contributing to Omarchy source code. **If you're about to edit a config file in ~/.config/ on this system, STOP and use this skill first.** -**Do NOT use this skill for Omarchy development tasks** (editing files in `~/.local/share/omarchy/`, creating migrations, or running `omarchy dev ...` workflows). +**Do NOT use this skill for Omarchy development tasks** (editing the Omarchy source tree, creating migrations, or running `omarchy dev ...` workflows). ## Critical Safety Rules -**For end-user customization tasks, NEVER modify anything in `~/.local/share/omarchy/`** - but READING is safe and encouraged. +**For end-user customization tasks, NEVER modify anything in `/usr/share/omarchy/`** - but READING is safe and encouraged. This directory contains Omarchy's source files managed by git. Any changes will be: - Lost on next `omarchy update` @@ -46,7 +46,7 @@ This directory contains Omarchy's source files managed by git. Any changes will - Break the system's update mechanism ``` -~/.local/share/omarchy/ # READ-ONLY - NEVER EDIT (reading is OK) +/usr/share/omarchy/ # READ-ONLY - NEVER EDIT (reading is OK) ├── bin/ # Source scripts (symlinked to PATH) ├── config/ # Default config templates ├── themes/ # Stock themes @@ -56,11 +56,11 @@ This directory contains Omarchy's source files managed by git. Any changes will └── install/ # Installation scripts ``` -**Reading `~/.local/share/omarchy/` is SAFE and useful** - do it freely to: +**Reading `/usr/share/omarchy/` is SAFE and useful** - do it freely to: - Understand how omarchy commands work: `omarchy theme set --help` or `cat $(which omarchy-theme-set)` -- See default configs before customizing: `cat ~/.local/share/omarchy/config/omarchy/shell.json` +- See default configs before customizing: `cat /usr/share/omarchy/config/omarchy/shell.json` - Check stock theme files to copy for customization -- Reference default hyprland settings: `cat ~/.local/share/omarchy/default/hypr/*` +- Reference default hyprland settings: `cat /usr/share/omarchy/default/hypr/*` **Always use these safe locations instead:** - `~/.config/` - User configuration (safe to edit) @@ -154,7 +154,7 @@ inside a single long-running Quickshell process (`omarchy-shell`). ``` ~/.config/omarchy/shell.json # User overrides: bar.position, bar.layout, plugins[] -~/.local/share/omarchy/config/omarchy/shell.json # Canonical defaults +/usr/share/omarchy/config/omarchy/shell.json # Canonical defaults ``` The shell hot-reloads `shell.json` on save — no restart needed for layout @@ -208,7 +208,7 @@ cp ~/.config/hypr/bindings.conf ~/.config/hypr/bindings.conf.bak.$(date +%s) ### Pattern 2: Make a new theme 1. Create a directory under ~/.config/omarchy/themes. -2. See how an existing theme is done via ~/.local/share/omarchy/themes/catppuccin. +2. See how an existing theme is done via /usr/share/omarchy/themes/catppuccin. 3. Download a matching background (or several) from the internet and put them in ~/.config/omarchy/themes/[name-of-new-theme] 4. When done with the theme, run `omarchy theme set "Name of new theme"` @@ -243,7 +243,7 @@ omarchy refresh hyprland # The refresh command: # 1. Backs up current config with timestamp -# 2. Copies default from ~/.local/share/omarchy/config/ +# 2. Copies default from /usr/share/omarchy/config/ # 3. Restarts the component ``` @@ -354,7 +354,7 @@ omarchy reinstall When user requests system changes: 1. **Is it a stock omarchy command?** Use it directly -2. **Is it a config edit?** Edit in `~/.config/`, never `~/.local/share/omarchy/` +2. **Is it a config edit?** Edit in `~/.config/`, never `/usr/share/omarchy/` 3. **Is it a theme customization?** Create a NEW custom theme directory 4. **Is it automation?** Use hooks in `~/.config/omarchy/hooks/` 5. **Is it a package install?** Use `omarchy pkg add ` (or `omarchy pkg aur add ` for AUR-only packages) @@ -374,7 +374,7 @@ omarchy reminder clear ## Out of Scope This skill intentionally does not cover Omarchy source development. Do not use this skill for: -- Editing files in `~/.local/share/omarchy/` (`bin/`, `config/`, `default/`, `shell/`, `themes/`, `migrations/`, etc.) +- Editing files in `/usr/share/omarchy/` (`bin/`, `config/`, `default/`, `shell/`, `themes/`, `migrations/`, etc.) - Creating or editing migrations - Running `omarchy dev ...` commands diff --git a/finalize.sh b/finalize.sh deleted file mode 100644 index 7e84f4f6..00000000 --- a/finalize.sh +++ /dev/null @@ -1,64 +0,0 @@ -#!/bin/bash -# -# The in-target portion of an Omarchy install. This is intentionally boring: -# the caller has already prepared the system; all this script does is run the -# target-side setup scripts. The ISO parent owns UI/error handling, while the -# online path re-establishes its tty-backed traps below. - -export OMARCHY_INSTALL_LOG_FILE="${OMARCHY_INSTALL_LOG_FILE:-/var/log/omarchy-install.log}" - -if [[ ${OMARCHY_INSTALL_DEBUG:-} == "1" ]]; then - if [[ -n ${OMARCHY_CHROOT_FINALIZER:-} || ${OMARCHY_INSTALL_MODE:-} == "offline" ]]; then - if { mkdir -p "$(dirname "$OMARCHY_INSTALL_LOG_FILE")" && touch "$OMARCHY_INSTALL_LOG_FILE"; } 2>/dev/null; then - exec >>"$OMARCHY_INSTALL_LOG_FILE" 2>&1 - else - echo "[finalize-debug] WARNING: cannot write $OMARCHY_INSTALL_LOG_FILE; tracing to inherited stderr" >&2 - fi - fi - export PS4='+ ${BASH_SOURCE[0]##*/}:${LINENO}:${FUNCNAME[0]:-main}: ' - echo "[finalize-debug] tracing enabled for $$ at $(date -Is)" - set -x -fi - -set -eEo pipefail - -_OMARCHY_INSTALLER_DIR=$(dirname "$(realpath "${BASH_SOURCE[0]}")") -export OMARCHY_PATH="${OMARCHY_PATH:-$_OMARCHY_INSTALLER_DIR}" -export OMARCHY_INSTALL="${OMARCHY_INSTALL:-$_OMARCHY_INSTALLER_DIR/install}" -export PATH="$_OMARCHY_INSTALLER_DIR/bin:$OMARCHY_PATH/bin:$PATH" - -# Do not source helpers/all.sh here. That bundle unconditionally pulls in -# presentation and interactive error handling, both of which assume a -# controlling tty. The ISO runs this file through arch-chroot with -# stdout/stderr captured by the parent. Keep the offline bootstrap to the -# non-interactive primitives the scripts below use. -source "$OMARCHY_INSTALL/helpers/mode.sh" -detect_install_mode -export_legacy_mode_flags -source "$OMARCHY_INSTALL/helpers/chroot.sh" -source "$OMARCHY_INSTALL/helpers/logging.sh" - -# Online installs still run finalize.sh directly after install.sh execs it, so -# re-establish the interactive UI/error traps only for that tty-backed path. -if install_mode_is online; then - source "$OMARCHY_INSTALL/helpers/presentation.sh" - source "$OMARCHY_INSTALL/helpers/errors.sh" -fi - -# Mark every shipped migration as "done" so future updates only run the new -# ones. Idempotent; safe to re-run. -mkdir -p ~/.local/state/omarchy/migrations -for _f in "$OMARCHY_PATH/migrations"/*.sh; do - [[ -f $_f ]] && touch ~/.local/state/omarchy/migrations/"$(basename "$_f")" -done - -# Offline installs need the privileged system first-run block on the install -# user's first login. The sudoers shim is written by system-finalize.sh; this -# per-user marker ensures only the install user consumes it. -if install_mode_is offline; then - mkdir -p ~/.local/state/omarchy - touch ~/.local/state/omarchy/first-run.mode -fi - -omarchy-setup-user --force -source "$OMARCHY_INSTALL/post-install/finished.sh" diff --git a/install.sh b/install.sh deleted file mode 100644 index bb39c4d6..00000000 --- a/install.sh +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/bash -# -# Online install entry point. Run by the user on an existing Arch system to -# install / refresh Omarchy. Guards the host, ensures the omarchy runtime is -# up to date, then hands off to finalize.sh for the actual configure work. -# -# Offline installs (from the ISO) skip this script entirely: the Python -# orchestrator owns disk, base, bootloader, and package install before calling -# finalize.sh directly in the chroot. - -set -eEo pipefail - -_OMARCHY_INSTALLER_DIR=$(dirname "$(realpath "${BASH_SOURCE[0]}")") -export OMARCHY_PATH="${OMARCHY_PATH:-$_OMARCHY_INSTALLER_DIR}" -export OMARCHY_INSTALL="${OMARCHY_INSTALL:-$OMARCHY_PATH/install}" -export OMARCHY_INSTALL_LOG_FILE="${OMARCHY_INSTALL_LOG_FILE:-/var/log/omarchy-install.log}" -export PATH="$OMARCHY_PATH/bin:$PATH" - -source "$OMARCHY_INSTALL/helpers/mode.sh" -detect_install_mode -export_legacy_mode_flags - -source "$OMARCHY_INSTALL/helpers/all.sh" - -# Online-only setup: sanity-check the host, show the logo, start capturing -# the install log to /var/log. The orchestrator handles all of this itself -# in offline mode, so finalize.sh's caller environment looks the same in -# both modes by the time finalize.sh runs. -source "$OMARCHY_INSTALL/preflight/guard.sh" -source "$OMARCHY_INSTALL/preflight/begin.sh" -run_logged "$OMARCHY_INSTALL/preflight/show-env.sh" - -# Install/update the omarchy runtime + the default install set. -_omarchy_runtime_pkg="${OMARCHY_RUNTIME_PACKAGE:-omarchy}" -mapfile -t _omarchy_base_pkgs < <(grep -v '^#\|^$' "$OMARCHY_PATH/install/omarchy-base.packages") -sudo pacman -Syu --noconfirm --needed "$_omarchy_runtime_pkg" "${_omarchy_base_pkgs[@]}" - -# Root/system setup first; user-home setup remains in finalize.sh below. -sudo env \ - OMARCHY_INSTALL_MODE="${OMARCHY_INSTALL_MODE:-}" \ - OMARCHY_ONLINE_INSTALL="${OMARCHY_ONLINE_INSTALL:-}" \ - OMARCHY_CHROOT_INSTALL="${OMARCHY_CHROOT_INSTALL:-}" \ - OMARCHY_PATH="$OMARCHY_PATH" \ - OMARCHY_INSTALL="$OMARCHY_INSTALL" \ - OMARCHY_INSTALL_LOG_FILE="$OMARCHY_INSTALL_LOG_FILE" \ - OMARCHY_START_TIME="${OMARCHY_START_TIME:-}" \ - OMARCHY_START_EPOCH="${OMARCHY_START_EPOCH:-}" \ - OMARCHY_USER_NAME="${OMARCHY_USER_NAME:-}" \ - OMARCHY_USER_EMAIL="${OMARCHY_USER_EMAIL:-}" \ - OMARCHY_MIRROR="${OMARCHY_MIRROR:-}" \ - OMARCHY_INSTALL_USER="$USER" \ - bash "$OMARCHY_PATH/system-finalize.sh" - -exec bash "$OMARCHY_PATH/finalize.sh" diff --git a/install/config/all.sh b/install/config/all.sh index b8393bb5..f5a70796 100644 --- a/install/config/all.sh +++ b/install/config/all.sh @@ -1,44 +1,7 @@ -run_logged $OMARCHY_INSTALL/config/theme-system.sh -run_logged $OMARCHY_INSTALL/config/increase-lockout-limit.sh -run_logged $OMARCHY_INSTALL/config/lockscreen-pam.sh -run_logged $OMARCHY_INSTALL/config/fix-powerprofilesctl-shebang.sh -run_logged $OMARCHY_INSTALL/config/docker.sh -run_logged $OMARCHY_INSTALL/config/input-group.sh - -# Service enables centralized; run after all drop-in files are in place. -run_logged $OMARCHY_INSTALL/config/enable-services.sh - -run_logged $OMARCHY_INSTALL/config/hardware/network.sh -run_logged $OMARCHY_INSTALL/config/hardware/set-wireless-regdom.sh -run_logged $OMARCHY_INSTALL/config/hardware/fix-fkeys.sh -run_logged $OMARCHY_INSTALL/config/hardware/fix-synaptic-touchpad.sh -run_logged $OMARCHY_INSTALL/config/hardware/bluetooth.sh -run_logged $OMARCHY_INSTALL/config/hardware/nvidia.sh -run_logged $OMARCHY_INSTALL/config/hardware/vulkan.sh - -run_logged $OMARCHY_INSTALL/config/hardware/intel/video-acceleration.sh -run_logged $OMARCHY_INSTALL/config/hardware/intel/lpmd.sh -run_logged $OMARCHY_INSTALL/config/hardware/intel/thermald.sh -run_logged $OMARCHY_INSTALL/config/hardware/intel/ipu7-camera.sh -run_logged $OMARCHY_INSTALL/config/hardware/intel/ptl-kernel.sh -run_logged $OMARCHY_INSTALL/config/hardware/intel/fred.sh -run_logged $OMARCHY_INSTALL/config/hardware/intel/fix-wifi7-eht.sh -run_logged $OMARCHY_INSTALL/config/hardware/intel/sof-firmware.sh - -run_logged $OMARCHY_INSTALL/config/hardware/asus/fix-asus-ptl-display-backlight.sh -run_logged $OMARCHY_INSTALL/config/hardware/asus/fix-asus-ptl-b9406-display.sh -run_logged $OMARCHY_INSTALL/config/hardware/asus/fix-asus-ptl-b9406-touchpad.sh -run_logged $OMARCHY_INSTALL/config/hardware/asus/fix-z13-touchpad.sh - -run_logged $OMARCHY_INSTALL/config/hardware/framework/qmk-hid.sh - -run_logged $OMARCHY_INSTALL/config/hardware/apple/fix-spi-keyboard.sh -run_logged $OMARCHY_INSTALL/config/hardware/apple/fix-suspend-nvme.sh -run_logged $OMARCHY_INSTALL/config/hardware/apple/fix-t2.sh - -run_logged $OMARCHY_INSTALL/config/hardware/lenovo/fix-yoga-pro7-bass-speakers.sh - -run_logged $OMARCHY_INSTALL/config/hardware/fix-bcm43xx.sh -run_logged $OMARCHY_INSTALL/config/hardware/fix-surface-keyboard.sh -run_logged $OMARCHY_INSTALL/config/hardware/fix-yt6801-ethernet-adapter.sh -run_logged $OMARCHY_INSTALL/config/hardware/fix-tuxedo-backlight.sh +run_logged "$OMARCHY_INSTALL/config/theme-system.sh" +run_logged "$OMARCHY_INSTALL/config/increase-lockout-limit.sh" +run_logged "$OMARCHY_INSTALL/config/lockscreen-pam.sh" +run_logged "$OMARCHY_INSTALL/config/fix-powerprofilesctl-shebang.sh" +run_logged "$OMARCHY_INSTALL/config/docker.sh" +run_logged "$OMARCHY_INSTALL/config/enable-services.sh" +run_logged "$OMARCHY_INSTALL/config/firewall.sh" diff --git a/install/config/enable-services.sh b/install/config/enable-services.sh index a56cf9e9..d130545b 100644 --- a/install/config/enable-services.sh +++ b/install/config/enable-services.sh @@ -1,6 +1,5 @@ # Enable services only. Installs are followed by reboot, so don't start/reload # daemons mid-install. UFW and hardware-gated services stay in their own scripts. -systemctl enable bluetooth.service systemctl enable cups.service systemctl enable cups-browsed.service systemctl enable avahi-daemon.service diff --git a/install/config/firewall.sh b/install/config/firewall.sh new file mode 100644 index 00000000..5dd48fc3 --- /dev/null +++ b/install/config/firewall.sh @@ -0,0 +1,19 @@ +# Allow nothing in, everything out. +ufw default deny incoming +ufw default allow outgoing + +# Allow ports for LocalSend. +ufw allow 53317/udp +ufw allow 53317/tcp + +# Allow Docker containers to use DNS on host. +ufw allow in proto udp from 172.16.0.0/12 to 172.17.0.1 port 53 comment 'allow-docker-dns' +ufw allow in proto udp from 192.168.0.0/16 to 172.17.0.1 port 53 comment 'allow-docker-dns' + +# Turn on Docker protections. +ufw-docker install + +# Installs are followed by reboot, so configure UFW to start on the installed +# system instead of mutating the live install session's firewall. +sed -i 's/^ENABLED=.*/ENABLED=yes/' /etc/ufw/ufw.conf +systemctl enable ufw diff --git a/install/config/sleep-lock.sh b/install/config/sleep-lock.sh deleted file mode 100644 index 62568b91..00000000 --- a/install/config/sleep-lock.sh +++ /dev/null @@ -1,3 +0,0 @@ -mkdir -p ~/.config/systemd/user/ -cp "$OMARCHY_PATH/config/systemd/user/omarchy-sleep-lock.service" ~/.config/systemd/user/ -systemctl --user enable omarchy-sleep-lock.service diff --git a/install/config/theme-system.sh b/install/config/theme-system.sh index 15d2d2b4..2902e1cd 100644 --- a/install/config/theme-system.sh +++ b/install/config/theme-system.sh @@ -4,6 +4,7 @@ ln -snf /usr/share/icons/Adwaita/symbolic/actions/go-previous-symbolic.svg \ /usr/share/icons/Yaru/scalable/actions/go-previous-symbolic.svg ln -snf /usr/share/icons/Adwaita/symbolic/actions/go-next-symbolic.svg \ /usr/share/icons/Yaru/scalable/actions/go-next-symbolic.svg +gtk-update-icon-cache /usr/share/icons/Yaru &>/dev/null || true # Chromium policy directory for theme mkdir -p /etc/chromium/policies/managed diff --git a/install/config/theme-user.sh b/install/config/theme-user.sh deleted file mode 100644 index 29645acf..00000000 --- a/install/config/theme-user.sh +++ /dev/null @@ -1,17 +0,0 @@ -# Setup user theme folder -mkdir -p ~/.config/omarchy/themes - -# Set initial theme. Offline ISO installs only need the user's theme files and -# symlinks seeded; there is no running desktop/session bus in the chroot, so -# skip shell IPC, dconf, app retint hooks, and background transition work. -if install_mode_is offline; then - OMARCHY_THEME_OFFLINE=1 OMARCHY_THEME_SKIP_BACKGROUND=1 omarchy-theme-set "Tokyo Night" -else - omarchy-theme-set "Tokyo Night" -fi -rm -rf ~/.config/chromium/SingletonLock # otherwise archiso will own the chromium singleton -omarchy-theme-set-pi --activate - -# Set specific app links for current theme -mkdir -p ~/.config/btop/themes -ln -snf ~/.config/omarchy/current/theme/btop.theme ~/.config/btop/themes/current.theme diff --git a/install/config/user.sh b/install/config/user.sh deleted file mode 100644 index 063080c8..00000000 --- a/install/config/user.sh +++ /dev/null @@ -1,9 +0,0 @@ -run_logged $OMARCHY_INSTALL/config/theme-user.sh -run_logged $OMARCHY_INSTALL/config/git.sh -run_logged $OMARCHY_INSTALL/config/xcompose.sh -run_logged $OMARCHY_INSTALL/config/mise-work.sh -run_logged $OMARCHY_INSTALL/config/sleep-lock.sh -run_logged $OMARCHY_INSTALL/config/hardware/bluetooth-user.sh -run_logged $OMARCHY_INSTALL/config/hardware/asus/fix-audio-mixer.sh -run_logged $OMARCHY_INSTALL/config/hardware/asus/fix-mic.sh -run_logged $OMARCHY_INSTALL/config/hardware/framework/fix-f13-amd-audio-input.sh diff --git a/install/first-run/cleanup-reboot-sudoers.sh b/install/first-run/cleanup-reboot-sudoers.sh deleted file mode 100644 index d29065ed..00000000 --- a/install/first-run/cleanup-reboot-sudoers.sh +++ /dev/null @@ -1 +0,0 @@ -sudo -n rm -f /etc/sudoers.d/99-omarchy-installer-reboot 2>/dev/null || true diff --git a/install/first-run/dns-resolver.sh b/install/first-run/dns-resolver.sh deleted file mode 100644 index bf46388a..00000000 --- a/install/first-run/dns-resolver.sh +++ /dev/null @@ -1,4 +0,0 @@ -# https://wiki.archlinux.org/title/Systemd-resolved -echo "Symlink resolved stub-resolv to /etc/resolv.conf" - -sudo ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf diff --git a/install/first-run/firewall.sh b/install/first-run/firewall.sh deleted file mode 100644 index 96210c8b..00000000 --- a/install/first-run/firewall.sh +++ /dev/null @@ -1,21 +0,0 @@ -# Allow nothing in, everything out -sudo ufw default deny incoming -sudo ufw default allow outgoing - -# Allow ports for LocalSend -sudo ufw allow 53317/udp -sudo ufw allow 53317/tcp - -# Allow Docker containers to use DNS on host -sudo ufw allow in proto udp from 172.16.0.0/12 to 172.17.0.1 port 53 comment 'allow-docker-dns' -sudo ufw allow in proto udp from 192.168.0.0/16 to 172.17.0.1 port 53 comment 'allow-docker-dns' - -# Turn on the firewall -sudo ufw --force enable - -# Enable UFW systemd service to start on boot -sudo systemctl enable ufw - -# Turn on Docker protections -sudo ufw-docker install -sudo ufw reload diff --git a/install/first-run/gnome-theme-system.sh b/install/first-run/gnome-theme-system.sh deleted file mode 100644 index 28c2a137..00000000 --- a/install/first-run/gnome-theme-system.sh +++ /dev/null @@ -1 +0,0 @@ -sudo gtk-update-icon-cache /usr/share/icons/Yaru diff --git a/install/hardware/all.sh b/install/hardware/all.sh new file mode 100644 index 00000000..2ad7f096 --- /dev/null +++ b/install/hardware/all.sh @@ -0,0 +1,41 @@ +run_logged "$OMARCHY_INSTALL/hardware/asus-rog.sh" +run_logged "$OMARCHY_INSTALL/hardware/framework16.sh" +run_logged "$OMARCHY_INSTALL/hardware/dell-xps-touchpad-haptics.sh" +run_logged "$OMARCHY_INSTALL/hardware/surface.sh" + +run_logged "$OMARCHY_INSTALL/hardware/network.sh" +run_logged "$OMARCHY_INSTALL/hardware/input-group.sh" +run_logged "$OMARCHY_INSTALL/hardware/set-wireless-regdom.sh" +run_logged "$OMARCHY_INSTALL/hardware/fix-fkeys.sh" +run_logged "$OMARCHY_INSTALL/hardware/fix-synaptic-touchpad.sh" +run_logged "$OMARCHY_INSTALL/hardware/bluetooth.sh" +run_logged "$OMARCHY_INSTALL/hardware/nvidia.sh" +run_logged "$OMARCHY_INSTALL/hardware/vulkan.sh" + +run_logged "$OMARCHY_INSTALL/hardware/intel/video-acceleration.sh" +run_logged "$OMARCHY_INSTALL/hardware/intel/lpmd.sh" +run_logged "$OMARCHY_INSTALL/hardware/intel/thermald.sh" +run_logged "$OMARCHY_INSTALL/hardware/intel/ipu7-camera.sh" +run_logged "$OMARCHY_INSTALL/hardware/intel/ptl-kernel.sh" +run_logged "$OMARCHY_INSTALL/hardware/intel/fred.sh" +run_logged "$OMARCHY_INSTALL/hardware/intel/fix-wifi7-eht.sh" +run_logged "$OMARCHY_INSTALL/hardware/intel/sof-firmware.sh" + +run_logged "$OMARCHY_INSTALL/hardware/asus/fix-asus-ptl-display-backlight.sh" +run_logged "$OMARCHY_INSTALL/hardware/asus/fix-asus-ptl-b9406-display.sh" +run_logged "$OMARCHY_INSTALL/hardware/asus/fix-asus-ptl-b9406-touchpad.sh" +run_logged "$OMARCHY_INSTALL/hardware/asus/fix-z13-touchpad.sh" + +run_logged "$OMARCHY_INSTALL/hardware/framework/qmk-hid.sh" + +run_logged "$OMARCHY_INSTALL/hardware/apple/fix-spi-keyboard.sh" +run_logged "$OMARCHY_INSTALL/hardware/apple/fix-suspend-nvme.sh" +run_logged "$OMARCHY_INSTALL/hardware/apple/fix-t2.sh" + +run_logged "$OMARCHY_INSTALL/hardware/lenovo/fix-yoga-pro7-bass-speakers.sh" + +run_logged "$OMARCHY_INSTALL/hardware/fix-bcm43xx.sh" +run_logged "$OMARCHY_INSTALL/hardware/fix-surface-keyboard.sh" +run_logged "$OMARCHY_INSTALL/hardware/fix-yt6801-ethernet-adapter.sh" +run_logged "$OMARCHY_INSTALL/hardware/fix-tuxedo-backlight.sh" +run_logged "$OMARCHY_INSTALL/hardware/pacman.sh" diff --git a/install/config/hardware/apple/fix-spi-keyboard.sh b/install/hardware/apple/fix-spi-keyboard.sh similarity index 100% rename from install/config/hardware/apple/fix-spi-keyboard.sh rename to install/hardware/apple/fix-spi-keyboard.sh diff --git a/install/config/hardware/apple/fix-suspend-nvme.sh b/install/hardware/apple/fix-suspend-nvme.sh similarity index 100% rename from install/config/hardware/apple/fix-suspend-nvme.sh rename to install/hardware/apple/fix-suspend-nvme.sh diff --git a/install/config/hardware/apple/fix-t2.sh b/install/hardware/apple/fix-t2.sh similarity index 100% rename from install/config/hardware/apple/fix-t2.sh rename to install/hardware/apple/fix-t2.sh diff --git a/install/packaging/asus-rog.sh b/install/hardware/asus-rog.sh similarity index 100% rename from install/packaging/asus-rog.sh rename to install/hardware/asus-rog.sh diff --git a/install/config/hardware/asus/fix-asus-ptl-b9406-display.sh b/install/hardware/asus/fix-asus-ptl-b9406-display.sh similarity index 100% rename from install/config/hardware/asus/fix-asus-ptl-b9406-display.sh rename to install/hardware/asus/fix-asus-ptl-b9406-display.sh diff --git a/install/config/hardware/asus/fix-asus-ptl-b9406-touchpad.sh b/install/hardware/asus/fix-asus-ptl-b9406-touchpad.sh similarity index 100% rename from install/config/hardware/asus/fix-asus-ptl-b9406-touchpad.sh rename to install/hardware/asus/fix-asus-ptl-b9406-touchpad.sh diff --git a/install/config/hardware/asus/fix-asus-ptl-display-backlight.sh b/install/hardware/asus/fix-asus-ptl-display-backlight.sh similarity index 100% rename from install/config/hardware/asus/fix-asus-ptl-display-backlight.sh rename to install/hardware/asus/fix-asus-ptl-display-backlight.sh diff --git a/install/config/hardware/asus/fix-z13-touchpad.sh b/install/hardware/asus/fix-z13-touchpad.sh similarity index 100% rename from install/config/hardware/asus/fix-z13-touchpad.sh rename to install/hardware/asus/fix-z13-touchpad.sh diff --git a/install/config/hardware/bluetooth.sh b/install/hardware/bluetooth.sh similarity index 84% rename from install/config/hardware/bluetooth.sh rename to install/hardware/bluetooth.sh index d78cad49..5ef25061 100644 --- a/install/config/hardware/bluetooth.sh +++ b/install/hardware/bluetooth.sh @@ -1,3 +1,5 @@ +systemctl enable bluetooth.service + # Persist last power state across reboots (default AutoEnable=true overrides it) if [[ -f /etc/bluetooth/main.conf ]]; then sed -i 's/^#\?AutoEnable=.*/AutoEnable=false/' /etc/bluetooth/main.conf diff --git a/install/packaging/dell-xps-touchpad-haptics.sh b/install/hardware/dell-xps-touchpad-haptics.sh similarity index 100% rename from install/packaging/dell-xps-touchpad-haptics.sh rename to install/hardware/dell-xps-touchpad-haptics.sh diff --git a/install/config/hardware/fix-bcm43xx.sh b/install/hardware/fix-bcm43xx.sh similarity index 100% rename from install/config/hardware/fix-bcm43xx.sh rename to install/hardware/fix-bcm43xx.sh diff --git a/install/config/hardware/fix-fkeys.sh b/install/hardware/fix-fkeys.sh similarity index 100% rename from install/config/hardware/fix-fkeys.sh rename to install/hardware/fix-fkeys.sh diff --git a/install/config/hardware/fix-surface-keyboard.sh b/install/hardware/fix-surface-keyboard.sh similarity index 100% rename from install/config/hardware/fix-surface-keyboard.sh rename to install/hardware/fix-surface-keyboard.sh diff --git a/install/config/hardware/fix-synaptic-touchpad.sh b/install/hardware/fix-synaptic-touchpad.sh similarity index 100% rename from install/config/hardware/fix-synaptic-touchpad.sh rename to install/hardware/fix-synaptic-touchpad.sh diff --git a/install/config/hardware/fix-tuxedo-backlight.sh b/install/hardware/fix-tuxedo-backlight.sh similarity index 100% rename from install/config/hardware/fix-tuxedo-backlight.sh rename to install/hardware/fix-tuxedo-backlight.sh diff --git a/install/config/hardware/fix-yt6801-ethernet-adapter.sh b/install/hardware/fix-yt6801-ethernet-adapter.sh similarity index 100% rename from install/config/hardware/fix-yt6801-ethernet-adapter.sh rename to install/hardware/fix-yt6801-ethernet-adapter.sh diff --git a/install/config/hardware/framework/qmk-hid.sh b/install/hardware/framework/qmk-hid.sh similarity index 100% rename from install/config/hardware/framework/qmk-hid.sh rename to install/hardware/framework/qmk-hid.sh diff --git a/install/packaging/framework16.sh b/install/hardware/framework16.sh similarity index 100% rename from install/packaging/framework16.sh rename to install/hardware/framework16.sh diff --git a/install/config/input-group.sh b/install/hardware/input-group.sh similarity index 100% rename from install/config/input-group.sh rename to install/hardware/input-group.sh diff --git a/install/config/hardware/intel/fix-wifi7-eht.sh b/install/hardware/intel/fix-wifi7-eht.sh similarity index 100% rename from install/config/hardware/intel/fix-wifi7-eht.sh rename to install/hardware/intel/fix-wifi7-eht.sh diff --git a/install/config/hardware/intel/fred.sh b/install/hardware/intel/fred.sh similarity index 68% rename from install/config/hardware/intel/fred.sh rename to install/hardware/intel/fred.sh index b7e0d307..af8d43bf 100644 --- a/install/config/hardware/intel/fred.sh +++ b/install/hardware/intel/fred.sh @@ -1,7 +1,6 @@ # Enable Flexible Return and Event Delivery on Intel Panther Lake. DROP_IN="/etc/limine-entry-tool.d/intel-panther-lake-fred.conf" -DEFAULT_LIMINE="/etc/default/limine" if omarchy-hw-intel-ptl; then if [[ ! -f $DROP_IN ]] || ! grep -q 'fred=on' "$DROP_IN"; then @@ -11,8 +10,4 @@ if omarchy-hw-intel-ptl; then KERNEL_CMDLINE[default]+=" fred=on" EOF fi - - if [[ -f $DEFAULT_LIMINE ]] && ! grep -q 'fred=on' "$DEFAULT_LIMINE"; then - cat "$DROP_IN" | sudo tee -a "$DEFAULT_LIMINE" >/dev/null - fi fi diff --git a/install/config/hardware/intel/ipu7-camera.sh b/install/hardware/intel/ipu7-camera.sh similarity index 100% rename from install/config/hardware/intel/ipu7-camera.sh rename to install/hardware/intel/ipu7-camera.sh diff --git a/install/config/hardware/intel/lpmd.sh b/install/hardware/intel/lpmd.sh similarity index 100% rename from install/config/hardware/intel/lpmd.sh rename to install/hardware/intel/lpmd.sh diff --git a/install/config/hardware/intel/ptl-kernel.sh b/install/hardware/intel/ptl-kernel.sh similarity index 100% rename from install/config/hardware/intel/ptl-kernel.sh rename to install/hardware/intel/ptl-kernel.sh diff --git a/install/config/hardware/intel/sof-firmware.sh b/install/hardware/intel/sof-firmware.sh similarity index 100% rename from install/config/hardware/intel/sof-firmware.sh rename to install/hardware/intel/sof-firmware.sh diff --git a/install/config/hardware/intel/thermald.sh b/install/hardware/intel/thermald.sh similarity index 100% rename from install/config/hardware/intel/thermald.sh rename to install/hardware/intel/thermald.sh diff --git a/install/config/hardware/intel/video-acceleration.sh b/install/hardware/intel/video-acceleration.sh similarity index 100% rename from install/config/hardware/intel/video-acceleration.sh rename to install/hardware/intel/video-acceleration.sh diff --git a/install/config/hardware/lenovo/fix-yoga-pro7-bass-speakers.sh b/install/hardware/lenovo/fix-yoga-pro7-bass-speakers.sh similarity index 100% rename from install/config/hardware/lenovo/fix-yoga-pro7-bass-speakers.sh rename to install/hardware/lenovo/fix-yoga-pro7-bass-speakers.sh diff --git a/install/config/hardware/network.sh b/install/hardware/network.sh similarity index 100% rename from install/config/hardware/network.sh rename to install/hardware/network.sh diff --git a/install/config/hardware/nvidia.sh b/install/hardware/nvidia.sh similarity index 100% rename from install/config/hardware/nvidia.sh rename to install/hardware/nvidia.sh diff --git a/install/hardware/pacman.sh b/install/hardware/pacman.sh new file mode 100644 index 00000000..9d2266bf --- /dev/null +++ b/install/hardware/pacman.sh @@ -0,0 +1,12 @@ +# Hardware-specific pacman repository extensions that must survive the final +# pacman.conf restore. +if lspci -nn | grep -q "106b:180[12]"; then + if ! grep -q '^\[arch-mact2\]' /etc/pacman.conf; then + cat >> /etc/pacman.conf <<'EOF' + +[arch-mact2] +Server = https://github.com/NoaHimesaka1873/arch-mact2-mirror/releases/download/release +SigLevel = Never +EOF + fi +fi diff --git a/install/config/hardware/set-wireless-regdom.sh b/install/hardware/set-wireless-regdom.sh similarity index 100% rename from install/config/hardware/set-wireless-regdom.sh rename to install/hardware/set-wireless-regdom.sh diff --git a/install/packaging/surface.sh b/install/hardware/surface.sh similarity index 100% rename from install/packaging/surface.sh rename to install/hardware/surface.sh diff --git a/install/config/hardware/vulkan.sh b/install/hardware/vulkan.sh similarity index 100% rename from install/config/hardware/vulkan.sh rename to install/hardware/vulkan.sh diff --git a/install/helpers/all.sh b/install/helpers/all.sh deleted file mode 100644 index ddac8d01..00000000 --- a/install/helpers/all.sh +++ /dev/null @@ -1,5 +0,0 @@ -source $OMARCHY_INSTALL/helpers/mode.sh -source $OMARCHY_INSTALL/helpers/chroot.sh -source $OMARCHY_INSTALL/helpers/presentation.sh -source $OMARCHY_INSTALL/helpers/errors.sh -source $OMARCHY_INSTALL/helpers/logging.sh diff --git a/install/helpers/errors.sh b/install/helpers/errors.sh deleted file mode 100644 index 996c785a..00000000 --- a/install/helpers/errors.sh +++ /dev/null @@ -1,179 +0,0 @@ -# Directs user to Omarchy Discord -QR_CODE=' -█▀▀▀▀▀█ ▄ ▄ ▀▄▄▄█ █▀▀▀▀▀█ -█ ███ █ ▄▄▄▄▀▄▀▄▀ █ ███ █ -█ ▀▀▀ █ ▄█ ▄█▄▄▀ █ ▀▀▀ █ -▀▀▀▀▀▀▀ ▀▄█ █ █ █ ▀▀▀▀▀▀▀ -▀▀█▀▀▄▀▀▀▀▄█▀▀█ ▀ █ ▀ █ -█▄█ ▄▄▀▄▄ ▀ ▄ ▀█▄▄▄▄ ▀ ▀█ -▄ ▄▀█ ▀▄▀▀▀▄ ▄█▀▄█▀▄▀▄▀█▀ -█ ▄▄█▄▀▄█ ▄▄▄ ▀ ▄▀██▀ ▀█ -▀ ▀ ▀ █ ▀▄ ▀▀█▀▀▀█▄▀ -█▀▀▀▀▀█ ▀█ ▄▀▀ █ ▀ █▄▀██ -█ ███ █ █▀▄▄▀ █▀███▀█▄██▄ -█ ▀▀▀ █ ██ ▀ █▄█ ▄▄▄█▀ █ -▀▀▀▀▀▀▀ ▀ ▀ ▀▀▀ ▀ ▀▀▀▀▀▀' - -# Track if we're already handling an error to prevent double-trapping -ERROR_HANDLING=false - -# Cursor is usually hidden while we install -show_cursor() { - printf "\033[?25h" -} - -# Display truncated log lines from the install log -show_log_tail() { - if [[ -f $OMARCHY_INSTALL_LOG_FILE ]]; then - local log_lines=$((TERM_HEIGHT - LOGO_HEIGHT - 35)) - local max_line_width=$((LOGO_WIDTH - 4)) - - tail -n $log_lines "$OMARCHY_INSTALL_LOG_FILE" | while IFS= read -r line; do - if ((${#line} > max_line_width)); then - local truncated_line="${line:0:$max_line_width}..." - else - local truncated_line="$line" - fi - - gum style "$truncated_line" - done - - echo - fi -} - -# Display the failed command or script name -show_failed_script_or_command() { - if [[ -n ${CURRENT_SCRIPT:-} ]]; then - gum style "Failed script: $CURRENT_SCRIPT" - else - # Truncate long command lines to fit the display - local cmd="$BASH_COMMAND" - local max_cmd_width=$((LOGO_WIDTH - 4)) - - if ((${#cmd} > max_cmd_width)); then - cmd="${cmd:0:$max_cmd_width}..." - fi - - gum style "$cmd" - fi -} - -# Save original stdout and stderr for trap to use -save_original_outputs() { - exec 3>&1 4>&2 -} - -# Restore stdout and stderr to original (saved in FD 3 and 4) -# This ensures output goes to screen, not log file -restore_outputs() { - if [[ -e /proc/self/fd/3 ]] && [[ -e /proc/self/fd/4 ]]; then - exec 1>&3 2>&4 - fi -} - -# Error handler -catch_errors() { - # Store exit code before any conditionals or assignments overwrite $?. EXIT - # trap callers pass their already-preserved code because calling this function - # would otherwise reset $? before we can read it. - local exit_code="${1:-$?}" - - # Prevent recursive error handling - if [[ $ERROR_HANDLING == "true" ]]; then - return - else - ERROR_HANDLING=true - fi - - stop_log_output - - if [[ -n ${OMARCHY_CHROOT_FINALIZER:-} ]]; then - { - echo "Omarchy installation stopped inside offline finalizer." - echo "This command halted with exit code $exit_code:" - if [[ -n ${CURRENT_SCRIPT:-} ]]; then - echo "Failed script: $CURRENT_SCRIPT" - else - echo "$BASH_COMMAND" - fi - echo "The live ISO orchestrator will show the visible error screen." - } >&2 - exit "$exit_code" - fi - - restore_outputs - - clear_logo - show_cursor - - gum style --foreground 1 --padding "1 0 1 $PADDING_LEFT" "Omarchy installation stopped!" - show_log_tail - - gum style "This command halted with exit code $exit_code:" - show_failed_script_or_command - - gum style "$QR_CODE" - echo - gum style "Get help from the community via QR code or at https://discord.gg/tXFUdasqhY" - - # Offer options menu - while true; do - options=() - - if install_mode_is online; then - options+=("Retry installation") - fi - - # Add upload option if internet is available - if ping -c 1 -W 1 1.1.1.1 >/dev/null 2>&1; then - options+=("Upload log for support") - fi - - # Add remaining options - options+=("View full log") - options+=("Exit") - - choice=$(gum choose "${options[@]}" --header "What would you like to do?" --height 6 --padding "1 $PADDING_LEFT") - - case "$choice" in - "Retry installation") - OMARCHY_INSTALL_MODE="$OMARCHY_INSTALL_MODE" bash "$OMARCHY_PATH/install.sh" - break - ;; - "View full log") - if command -v less &>/dev/null; then - less "$OMARCHY_INSTALL_LOG_FILE" - else - tail "$OMARCHY_INSTALL_LOG_FILE" - fi - ;; - "Upload log for support") - omarchy-upload-log - ;; - "Exit" | "") - exit "$exit_code" - ;; - esac - done -} - -# Exit handler - ensures cleanup happens on any exit -exit_handler() { - local exit_code=$? - - # Only run if we're exiting with an error and haven't already handled it - if (( exit_code != 0 )) && [[ $ERROR_HANDLING != "true" ]]; then - catch_errors "$exit_code" - else - stop_log_output - [[ -n ${OMARCHY_CHROOT_FINALIZER:-} ]] || show_cursor - fi -} - -# Set up traps -trap catch_errors ERR INT TERM -trap exit_handler EXIT - -# Save original outputs in case we trap -save_original_outputs diff --git a/install/helpers/logging.sh b/install/helpers/logging.sh index a27b506b..e046ec56 100644 --- a/install/helpers/logging.sh +++ b/install/helpers/logging.sh @@ -1,139 +1,41 @@ -start_log_output() { - # Offline ISO installs already have a live dashboard on tty1. The chrooted - # finalizer's stdout/stderr is captured to logs, so this monitor would only - # create noisy feedback in the log and burn CPU. - [[ -n ${OMARCHY_CHROOT_FINALIZER:-} ]] && return 0 - - local ANSI_SAVE_CURSOR="\033[s" - local ANSI_RESTORE_CURSOR="\033[u" - local ANSI_CLEAR_LINE="\033[2K" - local ANSI_HIDE_CURSOR="\033[?25l" - local ANSI_RESET="\033[0m" - local ANSI_GRAY="\033[90m" - - # Save cursor position and hide cursor - printf $ANSI_SAVE_CURSOR - printf $ANSI_HIDE_CURSOR - - ( - local log_lines=20 - local max_line_width=$((LOGO_WIDTH - 4)) - - while true; do - # Read the last N lines into an array - mapfile -t current_lines < <(tail -n $log_lines "$OMARCHY_INSTALL_LOG_FILE" 2>/dev/null) - - # Build complete output buffer with escape sequences - output="" - for ((i = 0; i < log_lines; i++)); do - line="${current_lines[i]:-}" - - # Truncate if needed - if (( ${#line} > max_line_width )); then - line="${line:0:$max_line_width}..." - fi - - # Add clear line escape and formatted output for each line - if [[ -n $line ]]; then - output+="${ANSI_CLEAR_LINE}${ANSI_GRAY}${PADDING_LEFT_SPACES} → ${line}${ANSI_RESET}\n" - else - output+="${ANSI_CLEAR_LINE}${PADDING_LEFT_SPACES}\n" - fi - done - - printf "${ANSI_RESTORE_CURSOR}%b" "$output" - - sleep 0.1 - done - ) & - monitor_pid=$! -} - -stop_log_output() { - if [[ -n ${monitor_pid:-} ]]; then - kill $monitor_pid 2>/dev/null || true - wait $monitor_pid 2>/dev/null || true - unset monitor_pid - fi -} - start_install_log() { - sudo touch "$OMARCHY_INSTALL_LOG_FILE" - sudo chmod 666 "$OMARCHY_INSTALL_LOG_FILE" + mkdir -p "$(dirname "$OMARCHY_INSTALL_LOG_FILE")" + touch "$OMARCHY_INSTALL_LOG_FILE" + chmod 666 "$OMARCHY_INSTALL_LOG_FILE" 2>/dev/null || true - export OMARCHY_START_TIME=$(date '+%Y-%m-%d %H:%M:%S') - export OMARCHY_START_EPOCH=$(date +%s) + export OMARCHY_START_TIME="${OMARCHY_START_TIME:-$(date '+%Y-%m-%d %H:%M:%S')}" + export OMARCHY_START_EPOCH="${OMARCHY_START_EPOCH:-$(date +%s)}" - echo "=== Omarchy Installation Started: $OMARCHY_START_TIME ===" >>"$OMARCHY_INSTALL_LOG_FILE" - start_log_output + echo "=== Omarchy Setup Started: $OMARCHY_START_TIME ===" >>"$OMARCHY_INSTALL_LOG_FILE" } stop_install_log() { - stop_log_output - [[ -n ${OMARCHY_CHROOT_FINALIZER:-} ]] || show_cursor + [[ -n ${OMARCHY_INSTALL_LOG_FILE:-} ]] || return 0 - if [[ -n ${OMARCHY_INSTALL_LOG_FILE:-} ]]; then - OMARCHY_END_TIME=$(date '+%Y-%m-%d %H:%M:%S') - OMARCHY_END_EPOCH=$(date +%s) - echo "=== Omarchy Installation Completed: $OMARCHY_END_TIME ===" >>"$OMARCHY_INSTALL_LOG_FILE" - echo "" >>"$OMARCHY_INSTALL_LOG_FILE" - echo "=== Installation Time Summary ===" >>"$OMARCHY_INSTALL_LOG_FILE" + local end_time end_epoch duration mins secs + end_time=$(date '+%Y-%m-%d %H:%M:%S') + end_epoch=$(date +%s) - if [[ -f "/var/log/archinstall/install.log" ]]; then - ARCHINSTALL_START=$(grep -m1 '^\[' /var/log/archinstall/install.log 2>/dev/null | sed 's/^\[\([^]]*\)\].*/\1/' || true) - ARCHINSTALL_END=$(grep 'Installation completed without any errors' /var/log/archinstall/install.log 2>/dev/null | sed 's/^\[\([^]]*\)\].*/\1/' || true) + echo "=== Omarchy Setup Completed: $end_time ===" >>"$OMARCHY_INSTALL_LOG_FILE" - if [[ -n $ARCHINSTALL_START ]] && [[ -n $ARCHINSTALL_END ]]; then - ARCH_START_EPOCH=$(date -d "$ARCHINSTALL_START" +%s) - ARCH_END_EPOCH=$(date -d "$ARCHINSTALL_END" +%s) - ARCH_DURATION=$((ARCH_END_EPOCH - ARCH_START_EPOCH)) - - ARCH_MINS=$((ARCH_DURATION / 60)) - ARCH_SECS=$((ARCH_DURATION % 60)) - - echo "Archinstall: ${ARCH_MINS}m ${ARCH_SECS}s" >>"$OMARCHY_INSTALL_LOG_FILE" - fi - fi - - if [[ -z ${OMARCHY_START_TIME:-} ]] && [[ -f "$OMARCHY_INSTALL_LOG_FILE" ]]; then - OMARCHY_START_TIME=$(grep -m1 '^=== Omarchy Installation Started:' "$OMARCHY_INSTALL_LOG_FILE" 2>/dev/null | - sed 's/^=== Omarchy Installation Started: \(.*\) ===$/\1/' || true) - fi - - if [[ -z ${OMARCHY_START_EPOCH:-} && -n ${OMARCHY_START_TIME:-} ]]; then - OMARCHY_START_EPOCH=$(date -d "$OMARCHY_START_TIME" +%s) - fi - - if [[ -n ${OMARCHY_START_EPOCH:-} ]]; then - OMARCHY_DURATION=$((OMARCHY_END_EPOCH - OMARCHY_START_EPOCH)) - - OMARCHY_MINS=$((OMARCHY_DURATION / 60)) - OMARCHY_SECS=$((OMARCHY_DURATION % 60)) - - echo "Omarchy: ${OMARCHY_MINS}m ${OMARCHY_SECS}s" >>"$OMARCHY_INSTALL_LOG_FILE" - - if [[ -n ${ARCH_DURATION:-} ]]; then - TOTAL_DURATION=$((ARCH_DURATION + OMARCHY_DURATION)) - TOTAL_MINS=$((TOTAL_DURATION / 60)) - TOTAL_SECS=$((TOTAL_DURATION % 60)) - echo "Total: ${TOTAL_MINS}m ${TOTAL_SECS}s" >>"$OMARCHY_INSTALL_LOG_FILE" - fi - fi - echo "=================================" >>"$OMARCHY_INSTALL_LOG_FILE" - - echo "Rebooting system..." >>"$OMARCHY_INSTALL_LOG_FILE" + if [[ -n ${OMARCHY_START_EPOCH:-} ]]; then + duration=$((end_epoch - OMARCHY_START_EPOCH)) + mins=$((duration / 60)) + secs=$((duration % 60)) + echo "Omarchy setup: ${mins}m ${secs}s" >>"$OMARCHY_INSTALL_LOG_FILE" fi } run_logged() { local script="$1" - export CURRENT_SCRIPT="$script" + if [[ -z ${OMARCHY_INSTALL_LOG_FILE:-} ]]; then + bash -eE -c 'source "$1"' bash "$script" + return + fi echo "[$(date '+%Y-%m-%d %H:%M:%S')] Starting: $script" >>"$OMARCHY_INSTALL_LOG_FILE" - # Use a clean subshell, but keep errexit so failures inside sourced scripts - # cannot be hidden by a later successful command in the same script. if [[ ${OMARCHY_INSTALL_DEBUG:-} == "1" ]]; then PS4='+ ${BASH_SOURCE[0]##*/}:${LINENO}:${FUNCNAME[0]:-main}: ' \ bash -x -eE -c 'source "$1"' bash "$script" >"$OMARCHY_INSTALL_LOG_FILE" 2>&1 @@ -142,10 +44,8 @@ run_logged() { fi local exit_code=$? - if (( exit_code == 0 )); then echo "[$(date '+%Y-%m-%d %H:%M:%S')] Completed: $script" >>"$OMARCHY_INSTALL_LOG_FILE" - unset CURRENT_SCRIPT else echo "[$(date '+%Y-%m-%d %H:%M:%S')] Failed: $script (exit code: $exit_code)" >>"$OMARCHY_INSTALL_LOG_FILE" fi diff --git a/install/helpers/mode.sh b/install/helpers/mode.sh deleted file mode 100644 index 06dbb8fb..00000000 --- a/install/helpers/mode.sh +++ /dev/null @@ -1,51 +0,0 @@ -# OMARCHY_INSTALL_MODE is one of: online, offline -# online - bootstrap installed omarchy-* packages from the omacom-pkgs.org -# repo on an existing Arch system, then ran install.sh. -# offline - ISO build: archinstall pacstrapped the bundled mirror; install.sh -# runs in the chroot before the user's first boot. -# Legacy OMARCHY_CHROOT_INSTALL and OMARCHY_ONLINE_INSTALL still work as -# shims during transition. - -detect_install_mode() { - if [[ -n ${OMARCHY_INSTALL_MODE:-} ]]; then - case $OMARCHY_INSTALL_MODE in - online|offline) ;; - *) - echo "Error: invalid OMARCHY_INSTALL_MODE=$OMARCHY_INSTALL_MODE" >&2 - echo " must be one of: online, offline" >&2 - exit 1 - ;; - esac - export OMARCHY_INSTALL_MODE - return - fi - - if [[ -n ${OMARCHY_CHROOT_INSTALL:-} ]]; then - export OMARCHY_INSTALL_MODE=offline - elif [[ -n ${OMARCHY_ONLINE_INSTALL:-} ]]; then - export OMARCHY_INSTALL_MODE=online - else - export OMARCHY_INSTALL_MODE=online - fi -} - -install_mode_is() { - [[ ${OMARCHY_INSTALL_MODE:-} == "$1" ]] -} - -# Synchronize the legacy vars to the canonical mode so callers that still -# check OMARCHY_CHROOT_INSTALL / OMARCHY_ONLINE_INSTALL agree with us. -export_legacy_mode_flags() { - case ${OMARCHY_INSTALL_MODE:-} in - offline) - export OMARCHY_CHROOT_INSTALL=1 - unset OMARCHY_ONLINE_INSTALL - ;; - online) - export OMARCHY_ONLINE_INSTALL=true - unset OMARCHY_CHROOT_INSTALL - ;; - esac -} - -export -f install_mode_is diff --git a/install/helpers/presentation.sh b/install/helpers/presentation.sh deleted file mode 100644 index b6b27df0..00000000 --- a/install/helpers/presentation.sh +++ /dev/null @@ -1,48 +0,0 @@ -# Ensure we have gum available -if ! command -v gum &>/dev/null; then - omarchy-pkg-add gum -fi - -# Get terminal size from /dev/tty (works in all scenarios: direct, sourced, or piped) -if [[ -e /dev/tty ]]; then - TERM_SIZE=$(stty size 2>/dev/null max) max = length } END { print max+0 }' "$LOGO_PATH" 2>/dev/null || echo 0) -export LOGO_HEIGHT=$(wc -l <"$LOGO_PATH" 2>/dev/null || echo 0) - -export PADDING_LEFT=$(((TERM_WIDTH - LOGO_WIDTH) / 2)) -export PADDING_LEFT_SPACES=$(printf "%*s" $PADDING_LEFT "") - -# Tokyo Night theme for gum confirm -export GUM_CONFIRM_PROMPT_FOREGROUND="6" # Cyan for prompt -export GUM_CONFIRM_SELECTED_FOREGROUND="0" # Black text on selected -export GUM_CONFIRM_SELECTED_BACKGROUND="2" # Green background for selected -export GUM_CONFIRM_UNSELECTED_FOREGROUND="7" # White for unselected -export GUM_CONFIRM_UNSELECTED_BACKGROUND="0" # Black background for unselected -export PADDING="0 0 0 $PADDING_LEFT" # Gum Style -export GUM_CHOOSE_PADDING="$PADDING" -export GUM_FILTER_PADDING="$PADDING" -export GUM_INPUT_PADDING="$PADDING" -export GUM_SPIN_PADDING="$PADDING" -export GUM_TABLE_PADDING="$PADDING" -export GUM_CONFIRM_PADDING="$PADDING" - -clear_logo() { - printf "\033[H\033[2J" # Clear screen and move cursor to top-left - gum style --foreground 2 --padding "1 0 0 $PADDING_LEFT" "$(<"$LOGO_PATH")" -} diff --git a/install/login/all.sh b/install/login/all.sh deleted file mode 100644 index 45ff5ad6..00000000 --- a/install/login/all.sh +++ /dev/null @@ -1 +0,0 @@ -source $OMARCHY_INSTALL/login/system.sh diff --git a/install/login/hibernation.sh b/install/login/hibernation.sh deleted file mode 100644 index f6e94129..00000000 --- a/install/login/hibernation.sh +++ /dev/null @@ -1,4 +0,0 @@ -# Run before limine-snapper.sh so the resume hook + cmdline drop-ins are in -# place before limine-snapper performs the final Limine UKI build. The -# --no-rebuild flag tells hibernation setup to only write config here. -omarchy-hibernation-setup --force --no-rebuild diff --git a/install/login/limine-snapper.sh b/install/login/limine-snapper.sh deleted file mode 100644 index cc140675..00000000 --- a/install/login/limine-snapper.sh +++ /dev/null @@ -1,172 +0,0 @@ -configure_snapper_root() { - if install_mode_is offline; then - # ISO installs configure Snapper in the orchestrator/archinstall phase with - # `snapper --no-dbus`, before this finalizer runs. snapperd/DBus are not - # available inside arch-chroot, so do not call plain `snapper` here. - if [[ ! -f /etc/snapper/configs/root ]]; then - echo "Error: offline install reached finalizer without /etc/snapper/configs/root" >&2 - exit 1 - fi - return - fi - - if ! sudo snapper list-configs 2>/dev/null | grep -q "root"; then - sudo snapper -c root create-config / - fi - sudo cp "$OMARCHY_PATH/default/snapper/root" /etc/snapper/configs/root -} - -if command -v limine &>/dev/null; then - sudo tee /etc/mkinitcpio.conf.d/omarchy_hooks.conf </dev/null -HOOKS=(base udev plymouth keyboard autodetect microcode modconf kms keymap consolefont block encrypt filesystems fsck btrfs-overlayfs) -EOF - sudo tee /etc/mkinitcpio.conf.d/thunderbolt_module.conf </dev/null -MODULES+=(thunderbolt) -EOF - - # Detect boot mode - [[ -d /sys/firmware/efi ]] && EFI=true - - # If /etc/default/limine is already populated with a real cmdline (the ISO - # orchestrator pre-writes it from the live install config), skip the - # find+harvest+template-copy dance — we already have what we need. The - # harvest path stays as a fallback for online reinstalls and any flow where - # /etc/default/limine wasn't pre-populated. - if [[ -f /etc/default/limine ]] && ! grep -q "@@CMDLINE@@" /etc/default/limine; then - CMDLINE=$(grep '^KERNEL_CMDLINE\[default\]+=' /etc/default/limine | head -1 | - sed 's|^KERNEL_CMDLINE\[default\]+="||; s|"$||') - - if [[ -z ${CMDLINE// } ]]; then - echo "Error: /etc/default/limine has no KERNEL_CMDLINE[default]+= line" >&2 - exit 1 - fi - if [[ $CMDLINE != *root=* ]]; then - echo "Error: cmdline parsed from /etc/default/limine has no root=: $CMDLINE" >&2 - exit 1 - fi - else - # Find config location written by archinstall (legacy harvest path) - if [[ -f /boot/EFI/arch-limine/limine.conf ]]; then - limine_config="/boot/EFI/arch-limine/limine.conf" - elif [[ -f /boot/EFI/BOOT/limine.conf ]]; then - limine_config="/boot/EFI/BOOT/limine.conf" - elif [[ -f /boot/EFI/limine/limine.conf ]]; then - limine_config="/boot/EFI/limine/limine.conf" - elif [[ -f /boot/limine/limine.conf ]]; then - limine_config="/boot/limine/limine.conf" - elif [[ -f /boot/limine.conf ]]; then - limine_config="/boot/limine.conf" - else - echo "Error: Limine config not found" >&2 - exit 1 - fi - - CMDLINE=$(grep "^[[:space:]]*cmdline:" "$limine_config" | head -1 | sed 's/^[[:space:]]*cmdline:[[:space:]]*//') - - if [[ -z ${CMDLINE// } ]]; then - echo "Error: failed to extract kernel cmdline from $limine_config" >&2 - exit 1 - fi - if [[ $CMDLINE != *root=* ]]; then - echo "Error: extracted kernel cmdline has no root=: $CMDLINE" >&2 - exit 1 - fi - - sudo cp $OMARCHY_PATH/default/limine/default.conf /etc/default/limine - sudo sed -i "s|@@CMDLINE@@|$CMDLINE|g" /etc/default/limine - fi - - # Append any drop-in kernel cmdline configs (from hardware fix scripts, etc.) - for dropin in /etc/limine-entry-tool.d/*.conf; do - [ -f "$dropin" ] && cat "$dropin" | sudo tee -a /etc/default/limine >/dev/null - done - - # UKI and EFI fallback are EFI only - if [[ -z $EFI ]]; then - sudo sed -i '/^ENABLE_UKI=/d; /^ENABLE_LIMINE_FALLBACK=/d' /etc/default/limine - fi - - # Remove every alternate Limine config so limine-update can't pick a stale one - # over our /boot/limine.conf. - for stale in \ - /boot/EFI/arch-limine/limine.conf \ - /boot/EFI/BOOT/limine.conf \ - /boot/EFI/limine/limine.conf \ - /boot/limine/limine.conf; do - [[ -f $stale ]] && sudo rm -f "$stale" - done - - limine_esp_path=/boot - if [[ -f /etc/default/limine ]]; then - # shellcheck disable=SC1091 - source /etc/default/limine - limine_esp_path="${ESP_PATH:-/boot}" - fi - sudo cp "$OMARCHY_PATH/default/limine/limine.conf" "$limine_esp_path/limine.conf" - - # limine-mkinitcpio-hook fired its post-transaction UKI build when archinstall - # pacstrapped it (via omarchy-limine's depends) BEFORE /etc/default/limine and - # /etc/kernel/cmdline existed, so the UKI on disk was built with an empty - # cmdline. Delete every stale UKI for installed kernels so limine-update only - # finds our about-to-be-rebuilt one. - if [[ -d "$limine_esp_path/EFI/Linux" ]]; then - while IFS= read -r kname; do - [[ -n $kname ]] || continue - sudo rm -f "$limine_esp_path/EFI/Linux/"*"_${kname}.efi" \ - "$limine_esp_path/EFI/Linux/"*"_${kname}-fallback.efi" - done < <(cat /usr/lib/modules/*/pkgbase 2>/dev/null) - fi - - # limine-update runs limine-install + limine-mkinitcpio (which reads - # /etc/default/limine's KERNEL_CMDLINE[default] via limine-entry-tool and - # embeds it into a freshly-built UKI). mkinitcpio -P alone does NOT trigger - # limine's UKI pipeline — only this command does. - sudo limine-update - - # Only snapshot root — /home is user data; rolling it back loses user work. - configure_snapper_root - - # Disable btrfs quotas — full qgroup accounting is a major performance drag - sudo btrfs quota disable / 2>/dev/null || true - - chrootable_systemctl_enable limine-snapper-sync.service - LIMINE_CONFIGURED=true -fi - -# Restore legacy hook moves from older offline installer paths. Current ISO -# installs mask/unmask hooks in the orchestrator, so these files usually do not -# exist; stay quiet unless there is real cleanup to do. -if [[ -f /usr/share/libalpm/hooks/90-mkinitcpio-install.hook.disabled || -f /usr/share/libalpm/hooks/60-mkinitcpio-remove.hook.disabled ]]; then - echo "Re-enabling mkinitcpio hooks..." - - if [[ -f /usr/share/libalpm/hooks/90-mkinitcpio-install.hook.disabled ]]; then - sudo mv /usr/share/libalpm/hooks/90-mkinitcpio-install.hook.disabled /usr/share/libalpm/hooks/90-mkinitcpio-install.hook - fi - - if [[ -f /usr/share/libalpm/hooks/60-mkinitcpio-remove.hook.disabled ]]; then - sudo mv /usr/share/libalpm/hooks/60-mkinitcpio-remove.hook.disabled /usr/share/libalpm/hooks/60-mkinitcpio-remove.hook - fi - - echo "mkinitcpio hooks re-enabled" -fi - -# Final sanity check: assert the Limine config and UKI actually contain what -# they need to boot. Run AFTER snapper setup and hook re-enable so a -# validation failure doesn't leave the system half-configured. -if [[ ${LIMINE_CONFIGURED:-} == true ]]; then - if ! grep -q "^/+Omarchy" /boot/limine.conf; then - echo "Error: /boot/limine.conf does not contain an Omarchy entry" >&2 - exit 1 - fi - if [[ ${CMDLINE:-} == *cryptdevice=* ]] && ! grep -q "cryptdevice=" /boot/limine.conf; then - echo "Error: encrypted install but /boot/limine.conf has no cryptdevice=" >&2 - exit 1 - fi -fi - -if [[ -n $EFI ]] && efibootmgr &>/dev/null; then - # Remove the archinstall-created Limine entry - while IFS= read -r bootnum; do - sudo efibootmgr -b "$bootnum" -B >/dev/null 2>&1 - done < <(efibootmgr | grep -E "^Boot[0-9]{4}\*? Arch Linux Limine" | sed 's/^Boot\([0-9]\{4\}\).*/\1/') -fi diff --git a/install/login/sddm.sh b/install/login/sddm.sh index 004f1436..250ce80e 100644 --- a/install/login/sddm.sh +++ b/install/login/sddm.sh @@ -1,22 +1,6 @@ -# Static SDDM theme/session files and wayland config are package-owned. This -# script keeps only install-specific autologin and legacy cleanup. -rm -f /usr/share/sddm/hyprland.conf - -mkdir -p /etc/sddm.conf.d -autologin_conf=/etc/sddm.conf.d/autologin.conf -if [[ ! -f $autologin_conf ]]; then - cat > "$autologin_conf" < /etc/sudoers.d/99-omarchy-installer-reboot </dev/null || exit 0 -fi - -echo_in_style() { - echo "$1" | tte --canvas-width 0 --anchor-text c --frame-rate 640 print -} - -clear -echo -tte -i $OMARCHY_PATH/logo.txt --canvas-width 0 --anchor-text c --frame-rate 920 laseretch -echo - -# Display installation time if available -if [[ -f $OMARCHY_INSTALL_LOG_FILE ]] && grep -q "Total:" "$OMARCHY_INSTALL_LOG_FILE" 2>/dev/null; then - echo - TOTAL_TIME=$(tail -n 20 "$OMARCHY_INSTALL_LOG_FILE" | grep "^Total:" | sed 's/^Total:[[:space:]]*//') - if [[ -n $TOTAL_TIME ]]; then - echo_in_style "Installed in $TOTAL_TIME" - fi -else - echo_in_style "Finished installing" -fi - -if sudo test -f /etc/sudoers.d/99-omarchy-installer; then - sudo rm -f /etc/sudoers.d/99-omarchy-installer &>/dev/null -fi - -# Exit gracefully if user chooses not to reboot -if gum confirm --padding "0 0 0 $((PADDING_LEFT + 32))" --show-help=false --default --affirmative "Reboot Now" --negative "" ""; then - # Clear screen to hide any shutdown messages - clear - - sudo reboot 2>/dev/null -fi diff --git a/install/post-install/first-run-mode.sh b/install/post-install/first-run-mode.sh deleted file mode 100644 index b50d8e4b..00000000 --- a/install/post-install/first-run-mode.sh +++ /dev/null @@ -1,18 +0,0 @@ -# Setup sudo-less access for the privileged first-run system one-shot. The -# install user's ~/.local/state/omarchy/first-run.mode marker is created by -# finalize.sh while running as that user. -install_user="$OMARCHY_INSTALL_USER" -install_mode_is offline || exit 0 - -mkdir -p /etc/sudoers.d -cat > /etc/sudoers.d/first-run <> /etc/pacman.conf <<'EOF' - -[arch-mact2] -Server = https://github.com/NoaHimesaka1873/arch-mact2-mirror/releases/download/release -SigLevel = Never -EOF -fi +source "$OMARCHY_INSTALL/hardware/pacman.sh" diff --git a/install/post-install/system.sh b/install/post-install/system.sh index 2ac3a0d8..ad588b5e 100644 --- a/install/post-install/system.sh +++ b/install/post-install/system.sh @@ -1,8 +1,4 @@ -run_logged $OMARCHY_INSTALL/post-install/first-run-mode.sh -run_logged $OMARCHY_INSTALL/post-install/pacman.sh -run_logged $OMARCHY_INSTALL/post-install/legacy-cleanup.sh -run_logged $OMARCHY_INSTALL/post-install/udev.sh -run_logged $OMARCHY_INSTALL/post-install/localdb.sh -if install_mode_is online; then - run_logged $OMARCHY_INSTALL/post-install/allow-reboot.sh -fi +run_logged "$OMARCHY_INSTALL/post-install/dns-resolver.sh" +run_logged "$OMARCHY_INSTALL/post-install/pacman.sh" +run_logged "$OMARCHY_INSTALL/post-install/udev.sh" +run_logged "$OMARCHY_INSTALL/post-install/localdb.sh" diff --git a/install/preflight/all.sh b/install/preflight/all.sh deleted file mode 100644 index 67d28c22..00000000 --- a/install/preflight/all.sh +++ /dev/null @@ -1,12 +0,0 @@ -source $OMARCHY_INSTALL/preflight/guard.sh -source $OMARCHY_INSTALL/preflight/begin.sh -run_logged $OMARCHY_INSTALL/preflight/show-env.sh -run_logged $OMARCHY_INSTALL/preflight/migrations.sh - -# Offline (ISO chroot) bootstraps a system from scratch and needs the -# first-run-mode sudoers shim plus the temporary mkinitcpio hook freeze. -# Online installs run on an existing system that already has its own users. -if install_mode_is offline; then - run_logged $OMARCHY_INSTALL/preflight/first-run-mode.sh - run_logged $OMARCHY_INSTALL/preflight/disable-mkinitcpio.sh -fi diff --git a/install/preflight/begin.sh b/install/preflight/begin.sh deleted file mode 100644 index f83a7c38..00000000 --- a/install/preflight/begin.sh +++ /dev/null @@ -1,4 +0,0 @@ -clear_logo -gum style --foreground 3 --padding "1 0 0 $PADDING_LEFT" "Installing..." -echo -start_install_log diff --git a/install/preflight/disable-mkinitcpio.sh b/install/preflight/disable-mkinitcpio.sh deleted file mode 100644 index 731816e8..00000000 --- a/install/preflight/disable-mkinitcpio.sh +++ /dev/null @@ -1,16 +0,0 @@ -# Temporarily disable mkinitcpio hooks to prevent multiple regenerations during package installation -# This speeds up installation significantly - -echo "Temporarily disabling mkinitcpio hooks during installation..." - -# Move the specific mkinitcpio pacman hooks out of the way if they exist -if [[ -f /usr/share/libalpm/hooks/90-mkinitcpio-install.hook ]]; then - sudo mv /usr/share/libalpm/hooks/90-mkinitcpio-install.hook /usr/share/libalpm/hooks/90-mkinitcpio-install.hook.disabled -fi - -if [[ -f /usr/share/libalpm/hooks/60-mkinitcpio-remove.hook ]]; then - sudo mv /usr/share/libalpm/hooks/60-mkinitcpio-remove.hook /usr/share/libalpm/hooks/60-mkinitcpio-remove.hook.disabled -fi - -echo "mkinitcpio hooks disabled" - diff --git a/install/preflight/first-run-mode.sh b/install/preflight/first-run-mode.sh deleted file mode 100644 index 5e9b67f5..00000000 --- a/install/preflight/first-run-mode.sh +++ /dev/null @@ -1,16 +0,0 @@ -# Set first-run mode marker so we can install stuff post-installation -mkdir -p ~/.local/state/omarchy -touch ~/.local/state/omarchy/first-run.mode - -# Setup sudo-less access for first-run -sudo tee /etc/sudoers.d/first-run >/dev/null </dev/null | grep -q 'Secure Boot: enabled'; then - abort "Secure Boot disabled" -fi - -# Must not have Gnome or KDE already install -if pacman -Qe gnome-shell &>/dev/null || pacman -Qe plasma-desktop &>/dev/null; then - abort "Fresh + Vanilla Arch" -fi - -# Must have limine installed -command -v limine &>/dev/null || abort "Limine bootloader" - -# Must have btrfs root filesystem -[[ $(findmnt -n -o FSTYPE /) = "btrfs" ]] || abort "Btrfs root filesystem" - -# Cleared all guards -echo "Guards: OK" diff --git a/install/preflight/migrations.sh b/install/preflight/migrations.sh deleted file mode 100644 index 52f81fb7..00000000 --- a/install/preflight/migrations.sh +++ /dev/null @@ -1,6 +0,0 @@ -OMARCHY_MIGRATIONS_STATE_PATH=~/.local/state/omarchy/migrations -mkdir -p $OMARCHY_MIGRATIONS_STATE_PATH - -for file in $OMARCHY_PATH/migrations/*.sh; do - touch "$OMARCHY_MIGRATIONS_STATE_PATH/$(basename "$file")" -done diff --git a/install/preflight/show-env.sh b/install/preflight/show-env.sh deleted file mode 100644 index d0fc6a0b..00000000 --- a/install/preflight/show-env.sh +++ /dev/null @@ -1,6 +0,0 @@ -# Show installation environment variables -gum log --level info "Installation Environment:" - -env | grep -E "^(OMARCHY_INSTALL_MODE|OMARCHY_CHROOT_INSTALL|OMARCHY_ONLINE_INSTALL|OMARCHY_USER_NAME|OMARCHY_USER_EMAIL|USER|HOME|OMARCHY_REPO|OMARCHY_REF|OMARCHY_PATH)=" | sort | while IFS= read -r var; do - gum log --level info " $var" -done diff --git a/install/system/all.sh b/install/system/all.sh deleted file mode 100644 index 161f42ea..00000000 --- a/install/system/all.sh +++ /dev/null @@ -1,6 +0,0 @@ -# System-level install work. Keep the actual logic in the same atomic -# packaging/config/login/post-install scripts used by the online installer. -source $OMARCHY_INSTALL/packaging/system.sh -source $OMARCHY_INSTALL/config/all.sh -source $OMARCHY_INSTALL/login/system.sh -source $OMARCHY_INSTALL/post-install/system.sh diff --git a/install/user/all.sh b/install/user/all.sh index 563c0bd7..a17ec5dc 100644 --- a/install/user/all.sh +++ b/install/user/all.sh @@ -1,3 +1,13 @@ -source $OMARCHY_INSTALL/packaging/user.sh -source $OMARCHY_INSTALL/config/user.sh -run_logged $OMARCHY_INSTALL/login/default-keyring.sh +run_logged "$OMARCHY_INSTALL/user/theme.sh" +run_logged "$OMARCHY_INSTALL/user/git.sh" +run_logged "$OMARCHY_INSTALL/user/xcompose.sh" +run_logged "$OMARCHY_INSTALL/user/mise-work.sh" +run_logged "$OMARCHY_INSTALL/user/sleep-lock.sh" + +run_logged "$OMARCHY_INSTALL/user/hardware/bluetooth.sh" +run_logged "$OMARCHY_INSTALL/user/hardware/asus/fix-audio-mixer.sh" +run_logged "$OMARCHY_INSTALL/user/hardware/asus/fix-mic.sh" +run_logged "$OMARCHY_INSTALL/user/hardware/framework/fix-f13-amd-audio-input.sh" + +run_logged "$OMARCHY_INSTALL/user/default-keyring.sh" +run_logged "$OMARCHY_INSTALL/user/mise.sh" diff --git a/install/login/default-keyring.sh b/install/user/default-keyring.sh similarity index 100% rename from install/login/default-keyring.sh rename to install/user/default-keyring.sh diff --git a/install/first-run/gnome-theme-user.sh b/install/user/first-run/gnome-theme.sh similarity index 100% rename from install/first-run/gnome-theme-user.sh rename to install/user/first-run/gnome-theme.sh diff --git a/install/first-run/gtk-primary-paste.sh b/install/user/first-run/gtk-primary-paste.sh similarity index 100% rename from install/first-run/gtk-primary-paste.sh rename to install/user/first-run/gtk-primary-paste.sh diff --git a/install/first-run/install-voxtype.hook b/install/user/first-run/install-voxtype.hook similarity index 100% rename from install/first-run/install-voxtype.hook rename to install/user/first-run/install-voxtype.hook diff --git a/install/first-run/welcome.sh b/install/user/first-run/welcome.sh similarity index 100% rename from install/first-run/welcome.sh rename to install/user/first-run/welcome.sh diff --git a/install/first-run/wifi.sh b/install/user/first-run/wifi.sh similarity index 100% rename from install/first-run/wifi.sh rename to install/user/first-run/wifi.sh diff --git a/install/config/git.sh b/install/user/git.sh similarity index 100% rename from install/config/git.sh rename to install/user/git.sh diff --git a/install/config/hardware/asus/fix-audio-mixer.sh b/install/user/hardware/asus/fix-audio-mixer.sh similarity index 100% rename from install/config/hardware/asus/fix-audio-mixer.sh rename to install/user/hardware/asus/fix-audio-mixer.sh diff --git a/install/config/hardware/asus/fix-mic.sh b/install/user/hardware/asus/fix-mic.sh similarity index 100% rename from install/config/hardware/asus/fix-mic.sh rename to install/user/hardware/asus/fix-mic.sh diff --git a/install/config/hardware/bluetooth-user.sh b/install/user/hardware/bluetooth.sh similarity index 76% rename from install/config/hardware/bluetooth-user.sh rename to install/user/hardware/bluetooth.sh index 7962cfe9..9bf06377 100644 --- a/install/config/hardware/bluetooth-user.sh +++ b/install/user/hardware/bluetooth.sh @@ -6,4 +6,8 @@ cp "$OMARCHY_PATH/default/wireplumber/wireplumber.conf.d/bluetooth-a2dp-autoconn # a NoInputNoOutput agent on the system bus so pair() actually completes. mkdir -p ~/.config/systemd/user/ cp "$OMARCHY_PATH/config/systemd/user/bt-agent.service" ~/.config/systemd/user/ -systemctl --user enable bt-agent.service +if declare -F omarchy_user_systemctl_enable >/dev/null; then + omarchy_user_systemctl_enable bt-agent.service +else + systemctl --user enable bt-agent.service +fi diff --git a/install/config/hardware/framework/fix-f13-amd-audio-input.sh b/install/user/hardware/framework/fix-f13-amd-audio-input.sh similarity index 100% rename from install/config/hardware/framework/fix-f13-amd-audio-input.sh rename to install/user/hardware/framework/fix-f13-amd-audio-input.sh diff --git a/install/first-run/recover-internal-monitor.sh b/install/user/hardware/recover-internal-monitor.sh similarity index 100% rename from install/first-run/recover-internal-monitor.sh rename to install/user/hardware/recover-internal-monitor.sh diff --git a/install/config/mise-work.sh b/install/user/mise-work.sh similarity index 68% rename from install/config/mise-work.sh rename to install/user/mise-work.sh index c6e5ff94..d7799f50 100644 --- a/install/config/mise-work.sh +++ b/install/user/mise-work.sh @@ -2,7 +2,6 @@ mkdir -p "$HOME/Work" mkdir -p "$HOME/Work/tries" -# Add ./bin to path for all items in ~/Work cat >"$HOME/Work/.mise.toml" <<'EOF' [env] _.path = "{{ cwd }}/bin" @@ -10,17 +9,18 @@ EOF mise trust ~/Work/.mise.toml -if install_mode_is offline; then +if [[ ${OMARCHY_SETUP_CONTEXT:-runtime} == "iso-chroot" ]]; then NODE_TARBALL=$(find /opt/packages -name "node-v*-linux-x64.tar.gz" -type f 2>/dev/null | head -n1) + if [[ -z $NODE_TARBALL ]]; then + echo "Error: bundled Node.js tarball missing from /opt/packages" >&2 + exit 1 + fi NODE_VERSION=$(basename "$NODE_TARBALL" | sed 's/node-v\(.*\)-linux-x64.tar.gz/\1/') NODE_INSTALL_DIR="$HOME/.local/share/mise/installs/node/$NODE_VERSION" mkdir -p "$NODE_INSTALL_DIR" - tar -xzf "$NODE_TARBALL" \ - --strip-components=1 \ - -C "$NODE_INSTALL_DIR" - + tar -xzf "$NODE_TARBALL" --strip-components=1 -C "$NODE_INSTALL_DIR" mise use -g node@"$NODE_VERSION" else mise use -g node@latest diff --git a/install/packaging/mise.sh b/install/user/mise.sh similarity index 100% rename from install/packaging/mise.sh rename to install/user/mise.sh diff --git a/install/user/sleep-lock.sh b/install/user/sleep-lock.sh new file mode 100644 index 00000000..09fc9623 --- /dev/null +++ b/install/user/sleep-lock.sh @@ -0,0 +1,7 @@ +mkdir -p ~/.config/systemd/user/ +cp "$OMARCHY_PATH/config/systemd/user/omarchy-sleep-lock.service" ~/.config/systemd/user/ +if declare -F omarchy_user_systemctl_enable >/dev/null; then + omarchy_user_systemctl_enable omarchy-sleep-lock.service +else + systemctl --user enable omarchy-sleep-lock.service +fi diff --git a/install/user/theme.sh b/install/user/theme.sh new file mode 100644 index 00000000..c29ab29f --- /dev/null +++ b/install/user/theme.sh @@ -0,0 +1,14 @@ +# Setup user theme folder +mkdir -p ~/.config/omarchy/themes + +if [[ ${OMARCHY_SETUP_CONTEXT:-runtime} == "iso-chroot" ]]; then + OMARCHY_THEME_HEADLESS=1 omarchy-theme-set "Tokyo Night" +else + omarchy-theme-set "Tokyo Night" +fi + +rm -rf ~/.config/chromium/SingletonLock +omarchy-theme-set-pi --activate + +mkdir -p ~/.config/btop/themes +ln -snf ~/.config/omarchy/current/theme/btop.theme ~/.config/btop/themes/current.theme diff --git a/install/config/xcompose.sh b/install/user/xcompose.sh similarity index 100% rename from install/config/xcompose.sh rename to install/user/xcompose.sh diff --git a/migrations/1751134560.sh b/migrations/1751134560.sh deleted file mode 100644 index a5761181..00000000 --- a/migrations/1751134560.sh +++ /dev/null @@ -1,28 +0,0 @@ -echo "Add UWSM env" - -export OMARCHY_PATH="$HOME/.local/share/omarchy" -export PATH="$OMARCHY_PATH/bin:$PATH" - -mkdir -p "$HOME/.config/uwsm/" -cat </dev/null; then - sudo pacman -S --noconfirm --needed polkit-gnome - systemctl --user stop hyprpolkitagent - systemctl --user disable hyprpolkitagent - sudo pacman -Rns --noconfirm hyprpolkitagent - setsid /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 & -fi diff --git a/migrations/1752188554.sh b/migrations/1752188554.sh deleted file mode 100644 index 13c5d54c..00000000 --- a/migrations/1752188554.sh +++ /dev/null @@ -1,5 +0,0 @@ -echo "Update chromium.desktop to ensure we are always using wayland" - -xdg-settings set default-web-browser chromium.desktop -xdg-mime default chromium.desktop x-scheme-handler/http -xdg-mime default chromium.desktop x-scheme-handler/https diff --git a/migrations/1752292967.sh b/migrations/1752292967.sh deleted file mode 100644 index c1b8fa2b..00000000 --- a/migrations/1752292967.sh +++ /dev/null @@ -1,19 +0,0 @@ -echo "Update to use UWSM and seamless login" - -if omarchy-cmd-missing uwsm; then - sudo rm -f /etc/systemd/system/getty@tty1.service.d/override.conf - sudo rmdir /etc/systemd/system/getty@tty1.service.d/ 2>/dev/null || true - - if [[ -f $HOME/.bash_profile ]]; then - # Remove the specific line - sed -i '/^\[\[ -z \$DISPLAY && \$(tty) == \/dev\/tty1 \]\] && exec Hyprland$/d' "$HOME/.bash_profile" - echo "Cleaned up .bash_profile" - fi - - if [[ -f $HOME/.config/environment.d/fcitx.conf ]]; then - echo "Removing GTK_IM_MODULE from fcitx config for Wayland..." - sed -i 's/^GTK_IM_MODULE=fcitx$//' "$HOME/.config/environment.d/fcitx.conf" - fi - - source $OMARCHY_PATH/install/login/plymouth.sh -fi diff --git a/migrations/1752535084.sh b/migrations/1752535084.sh deleted file mode 100644 index 092c429d..00000000 --- a/migrations/1752535084.sh +++ /dev/null @@ -1,7 +0,0 @@ -echo "Set a default fontconfig" - -if [[ ! -f $HOME/.config/fontconfig/fonts.conf ]]; then - mkdir -p ~/.config/fontconfig - cp ~/.local/share/omarchy/config/fontconfig/fonts.conf ~/.config/fontconfig/ - fc-cache -fv -fi diff --git a/migrations/1752535341.sh b/migrations/1752535341.sh deleted file mode 100644 index 9ac311ea..00000000 --- a/migrations/1752535341.sh +++ /dev/null @@ -1,9 +0,0 @@ -echo "Setting up GPG configuration with multiple keyservers for better reliability" - -if [[ ! -f /etc/gnupg/dirmngr.conf ]]; then - sudo mkdir -p /etc/gnupg - sudo cp ~/.local/share/omarchy/default/gpg/dirmngr.conf /etc/gnupg/ - sudo chmod 644 /etc/gnupg/dirmngr.conf - sudo gpgconf --kill dirmngr || true - sudo gpgconf --launch dirmngr || true -fi diff --git a/migrations/1752543801.sh b/migrations/1752543801.sh deleted file mode 100644 index 7c068add..00000000 --- a/migrations/1752543801.sh +++ /dev/null @@ -1,4 +0,0 @@ -echo "Add color and animation to pacman installs" - -grep -q '^Color' /etc/pacman.conf || sudo sed -i '/^\[options\]/a Color' /etc/pacman.conf -grep -q '^ILoveCandy' /etc/pacman.conf || sudo sed -i '/^\[options\]/a ILoveCandy' /etc/pacman.conf diff --git a/migrations/1752643269.sh b/migrations/1752643269.sh deleted file mode 100644 index 47d2cf79..00000000 --- a/migrations/1752643269.sh +++ /dev/null @@ -1,5 +0,0 @@ -echo "Add new matte black theme" - -if [[ ! -L $HOME/.config/omarchy/themes/matte-black ]]; then - ln -snf ~/.local/share/omarchy/themes/matte-black ~/.config/omarchy/themes/ -fi diff --git a/migrations/1752678932.sh b/migrations/1752678932.sh deleted file mode 100644 index 915a74d5..00000000 --- a/migrations/1752678932.sh +++ /dev/null @@ -1,3 +0,0 @@ -echo "Install missing docker-buildx package for out-of-the-box Kamal compatibility" - -omarchy-pkg-add docker-buildx diff --git a/migrations/1752725616.sh b/migrations/1752725616.sh deleted file mode 100644 index 8e2fe084..00000000 --- a/migrations/1752725616.sh +++ /dev/null @@ -1,14 +0,0 @@ -echo "Make light themes possible" - -if [[ -f ~/.local/share/applications/blueberry.desktop ]]; then - rm -f ~/.local/share/applications/blueberry.desktop - rm -f ~/.local/share/applications/org.pulseaudio.pavucontrol.desktop - update-desktop-database ~/.local/share/applications/ - - gsettings set org.gnome.desktop.interface color-scheme "prefer-dark" - gsettings set org.gnome.desktop.interface gtk-theme "Adwaita-dark" -fi - -if [[ ! -L $HOME/.config/omarchy/themes/rose-pine ]]; then - ln -snf ~/.local/share/omarchy/themes/rose-pine ~/.config/omarchy/themes/ -fi diff --git a/migrations/1752797704.sh b/migrations/1752797704.sh deleted file mode 100644 index b59111fa..00000000 --- a/migrations/1752797704.sh +++ /dev/null @@ -1,18 +0,0 @@ -echo "Prevent docker from requiring network readiness on boot" - -if [[ ! -f /etc/systemd/system/docker.service.d/no-block-boot.conf ]]; then - sudo mkdir -p /etc/systemd/system/docker.service.d/ - sudo tee /etc/systemd/system/docker.service.d/no-block-boot.conf <<'EOF' -[Unit] -DefaultDependencies=no -EOF - - sudo mkdir -p /etc/systemd/system/plymouth-quit.service.d/ - sudo tee /etc/systemd/system/plymouth-quit.service.d/wait-for-graphical.conf <<'EOF' -[Unit] -After=multi-user.target -EOF - - sudo systemctl daemon-reload - sudo systemctl mask plymouth-quit-wait.service -fi diff --git a/migrations/1752874371.sh b/migrations/1752874371.sh deleted file mode 100644 index 20cd3ad1..00000000 --- a/migrations/1752874371.sh +++ /dev/null @@ -1,5 +0,0 @@ -echo "Add Catppuccin Latte light theme" - -if [[ ! -L $HOME/.config/omarchy/themes/catppuccin-latte ]]; then - ln -snf ~/.local/share/omarchy/themes/catppuccin-latte ~/.config/omarchy/themes/ -fi diff --git a/migrations/1752896442.sh b/migrations/1752896442.sh deleted file mode 100644 index be8bf58d..00000000 --- a/migrations/1752896442.sh +++ /dev/null @@ -1,6 +0,0 @@ -echo "Remove old PulseAudio volume control GUI" - -if omarchy-pkg-present pavucontrol; then - omarchy-pkg-drop pavucontrol - omarchy-refresh-applications -fi diff --git a/migrations/1752897642.sh b/migrations/1752897642.sh deleted file mode 100644 index 1b4b1f81..00000000 --- a/migrations/1752897642.sh +++ /dev/null @@ -1,3 +0,0 @@ -echo "Remove needless fcitx5-configtool package" - -omarchy-pkg-drop fcitx5-configtool diff --git a/migrations/1752955912.sh b/migrations/1752955912.sh deleted file mode 100644 index fa55477c..00000000 --- a/migrations/1752955912.sh +++ /dev/null @@ -1,3 +0,0 @@ -echo "Install satty for the new screenshot flow" - -omarchy-pkg-add satty diff --git a/migrations/1753495989.sh b/migrations/1753495989.sh deleted file mode 100644 index 85e1a61e..00000000 --- a/migrations/1753495989.sh +++ /dev/null @@ -1,5 +0,0 @@ -echo "Allow updating of timezone by right-clicking on the clock (or running omarchy-cmd-tzupdate)" - -if omarchy-cmd-missing tzupdate; then - bash "$OMARCHY_PATH/install/config/timezones.sh" -fi diff --git a/migrations/1753689791.sh b/migrations/1753689791.sh deleted file mode 100644 index d7c3145c..00000000 --- a/migrations/1753689791.sh +++ /dev/null @@ -1,5 +0,0 @@ -echo "Add the new ristretto theme as an option" - -if [[ ! -L ~/.config/omarchy/themes/ristretto ]]; then - ln -nfs ~/.local/share/omarchy/themes/ristretto ~/.config/omarchy/themes/ -fi diff --git a/migrations/1753908454.sh b/migrations/1753908454.sh deleted file mode 100644 index 8b603247..00000000 --- a/migrations/1753908454.sh +++ /dev/null @@ -1,12 +0,0 @@ -echo "Migrate from manually downloaded fonts to font packages" -if ! pacman -Q ttf-cascadia-mono-nerd &>/dev/null; then - sudo pacman -S --noconfirm ttf-cascadia-mono-nerd - rm -rf ~/.local/share/fonts/Caskaydia* - fc-cache -fi - -if ! pacman -Q ttf-ia-writer &>/dev/null; then - sudo pacman -S --noconfirm ttf-ia-writer - rm -rf ~/.local/share/fonts/iAWriterMonoS* - fc-cache -fi diff --git a/migrations/1754047941.sh b/migrations/1754047941.sh deleted file mode 100644 index 2e51f3ee..00000000 --- a/migrations/1754047941.sh +++ /dev/null @@ -1,9 +0,0 @@ -echo "Add icon theme coloring" - -if ! pacman -Q yaru-icon-theme &>/dev/null; then - sudo pacman -S --noconfirm yaru-icon-theme - - if [[ -f ~/.config/omarchy/current/theme/icons.theme ]]; then - gsettings set org.gnome.desktop.interface icon-theme "$(<~/.config/omarchy/current/theme/icons.theme)" - fi -fi diff --git a/migrations/1754109724.sh b/migrations/1754109724.sh deleted file mode 100644 index dc39bbd3..00000000 --- a/migrations/1754109724.sh +++ /dev/null @@ -1,6 +0,0 @@ -echo "Add hyprsunset blue light filter" -if ! command -v hyprsunset &>/dev/null; then - sudo pacman -S --noconfirm --needed hyprsunset -fi - -omarchy-refresh-hyprsunset diff --git a/migrations/1754215533.sh b/migrations/1754215533.sh deleted file mode 100644 index 2657b623..00000000 --- a/migrations/1754215533.sh +++ /dev/null @@ -1,17 +0,0 @@ -echo "Enable auto-discovery of network printers" - -if [[ ! -f /etc/systemd/resolved.conf.d/10-disable-multicast.conf ]]; then - omarchy-pkg-add avahi nss-mdns - - # Disable multicast dns in resolved. Avahi will provide this for better network printer discovery - sudo mkdir -p /etc/systemd/resolved.conf.d - echo "[Resolve]\nMulticastDNS=no" | sudo tee /etc/systemd/resolved.conf.d/10-disable-multicast.conf - sudo systemctl enable --now avahi-daemon.service -fi - -if ! grep -q '^CreateRemotePrinters Yes' /etc/cups/cups-browsed.conf; then - omarchy-pkg-add cups-browsed - # Enable automatically adding remote printers - echo 'CreateRemotePrinters Yes' | sudo tee -a /etc/cups/cups-browsed.conf - sudo systemctl enable --now cups-browsed.service -fi diff --git a/migrations/1754221967.sh b/migrations/1754221967.sh deleted file mode 100644 index b1e42b7a..00000000 --- a/migrations/1754221967.sh +++ /dev/null @@ -1,3 +0,0 @@ -echo "Add support for accessing Android phone data via file manager" - -omarchy-pkg-add gvfs-mtp diff --git a/migrations/1754332200.sh b/migrations/1754332200.sh deleted file mode 100644 index 4e92daa4..00000000 --- a/migrations/1754332200.sh +++ /dev/null @@ -1,3 +0,0 @@ -echo "Remove old Omarchy TUI app now that we have the Omarchy Menu" - -rm -f ~/.local/share/applications/omarchy.desktop diff --git a/migrations/1754509222.sh b/migrations/1754509222.sh deleted file mode 100644 index 48f3c850..00000000 --- a/migrations/1754509222.sh +++ /dev/null @@ -1,3 +0,0 @@ -echo "Add xmlstarlet needed for updating fonts via Omarchy menu" - -omarchy-pkg-add xmlstarlet diff --git a/migrations/1754514972.sh b/migrations/1754514972.sh deleted file mode 100644 index 787d8bc7..00000000 --- a/migrations/1754514972.sh +++ /dev/null @@ -1,3 +0,0 @@ -echo "Fix multicast dns config for printers" - -echo -e "[Resolve]\nMulticastDNS=no" | sudo tee /etc/systemd/resolved.conf.d/10-disable-multicast.conf diff --git a/migrations/1754566681.sh b/migrations/1754566681.sh deleted file mode 100644 index 56d54afc..00000000 --- a/migrations/1754566681.sh +++ /dev/null @@ -1,7 +0,0 @@ -echo "Make new Osaka Jade theme available as new default" - -if [[ ! -L ~/.config/omarchy/themes/osaka-jade ]]; then - rm -rf ~/.config/omarchy/themes/osaka-jade - git -C ~/.local/share/omarchy checkout -f themes/osaka-jade - ln -nfs ~/.local/share/omarchy/themes/osaka-jade ~/.config/omarchy/themes/osaka-jade -fi diff --git a/migrations/1754668999.sh b/migrations/1754668999.sh deleted file mode 100644 index 7361dcd6..00000000 --- a/migrations/1754668999.sh +++ /dev/null @@ -1,3 +0,0 @@ -echo "Tune MTU probing for more reliable SSH" - -echo "net.ipv4.tcp_mtu_probing=1" | sudo tee -a /etc/sysctl.d/99-sysctl.conf diff --git a/migrations/1754856741.sh b/migrations/1754856741.sh deleted file mode 100644 index e6ef2be7..00000000 --- a/migrations/1754856741.sh +++ /dev/null @@ -1,5 +0,0 @@ -echo "Disable systemd-networkd-wait-online" - -sudo rm -rf /etc/systemd/system/systemd-networkd-wait-online.service.d/wait-for-only-one-interface.conf -sudo systemctl disable systemd-networkd-wait-online.service -sudo systemctl mask systemd-networkd-wait-online.service diff --git a/migrations/1754860578.sh b/migrations/1754860578.sh deleted file mode 100644 index a25fdcc6..00000000 --- a/migrations/1754860578.sh +++ /dev/null @@ -1,27 +0,0 @@ -echo "Update polkit policy to yield to fingerprint and fido2" - -# If fprint exists in polkit, it was wrong and needs reset -if [[ -f /etc/pam.d/polkit-1 ]] && grep -Fq 'pam_fprintd.so' /etc/pam.d/polkit-1; then - sudo tee /etc/pam.d/polkit-1 >/dev/null <<'EOF' -auth sufficient pam_fprintd.so -auth required pam_unix.so - -account required pam_unix.so -password required pam_unix.so -session required pam_unix.so -EOF -fi - -# If fido2 is in sudo, it won't be in polkit either way -if grep -q pam_u2f.so /etc/pam.d/sudo && [[ -f /etc/pam.d/polkit-1 ]] && ! grep -q 'pam_u2f.so' /etc/pam.d/polkit-1; then - sudo sed -i '1i auth sufficient pam_u2f.so cue authfile=/etc/fido2/fido2' /etc/pam.d/polkit-1 -elif grep -q pam_u2f.so /etc/pam.d/sudo && [[ ! -f /etc/pam.d/polkit-1 ]]; then - sudo tee /etc/pam.d/polkit-1 >/dev/null <<'EOF' -auth sufficient pam_u2f.so cue authfile=/etc/fido2/fido2 -auth required pam_unix.so - -account required pam_unix.so -password required pam_unix.so -session required pam_unix.so -EOF -fi diff --git a/migrations/1754984734.sh b/migrations/1754984734.sh deleted file mode 100644 index 843e4a0b..00000000 --- a/migrations/1754984734.sh +++ /dev/null @@ -1,23 +0,0 @@ -echo "Configure Docker to use the host's DNS resolver" - -if omarchy-cmd-present docker; then - # If the daemon configuration has been changed since we wrote it, leave it as-is - ORIGINAL_CONFIG='{"log-driver":"json-file","log-opts":{"max-size":"10m","max-file":"5"}}' - - NEW_CONFIG='{ - "log-driver": "json-file", - "log-opts": { "max-size": "10m", "max-file": "5" }, - "dns": ["172.17.0.1"], - "bip": "172.17.0.1/16" - }' - - if grep -Fq "$ORIGINAL_CONFIG" /etc/docker/daemon.json 2>/dev/null; then - echo "$NEW_CONFIG" | sudo tee /etc/docker/daemon.json >/dev/null - fi - - # Expose systemd-resolved to our Docker network - echo -e '[Resolve]\nDNSStubListenerExtra=172.17.0.1' | sudo tee /etc/systemd/resolved.conf.d/20-docker-dns.conf >/dev/null - - sudo systemctl restart systemd-resolved - sudo systemctl restart docker -fi diff --git a/migrations/1754996869.sh b/migrations/1754996869.sh deleted file mode 100644 index d2be16bb..00000000 --- a/migrations/1754996869.sh +++ /dev/null @@ -1,3 +0,0 @@ -echo "Increase sudo attempts limit to 10" - -source $OMARCHY_PATH/install/config/increase-sudo-tries.sh diff --git a/migrations/1755109182.sh b/migrations/1755109182.sh deleted file mode 100644 index 00e3493b..00000000 --- a/migrations/1755109182.sh +++ /dev/null @@ -1,31 +0,0 @@ -echo "Reset DNS configuration to DHCP (remove forced Cloudflare DNS)" - -# Reset DNS to use DHCP by default instead of forcing Cloudflare -# This preserves local development environments (.local domains, etc.) -# Users can still opt-in to Cloudflare DNS using: omarchy-dns Cloudflare - -if [[ -f /etc/systemd/resolved.conf ]]; then - # Backup current config with timestamp - backup_timestamp=$(date +"%Y%m%d%H%M%S") - sudo cp /etc/systemd/resolved.conf "/etc/systemd/resolved.conf.bak.${backup_timestamp}" - - # Remove explicit DNS entries to use DHCP - sudo sed -i '/^DNS=/d' /etc/systemd/resolved.conf - sudo sed -i '/^FallbackDNS=/d' /etc/systemd/resolved.conf - - # Add empty DNS entries to ensure DHCP is used - echo "DNS=" | sudo tee -a /etc/systemd/resolved.conf >/dev/null - echo "FallbackDNS=" | sudo tee -a /etc/systemd/resolved.conf >/dev/null - - # Remove any forced DNS config from systemd-networkd - if [[ -f /etc/systemd/network/99-omarchy-dns.network ]]; then - sudo rm -f /etc/systemd/network/99-omarchy-dns.network - sudo systemctl restart systemd-networkd - fi - - # Restart systemd-resolved to apply changes - sudo systemctl restart systemd-resolved - - echo "DNS configuration reset to use DHCP (router DNS)" - echo "To use Cloudflare DNS, run: omarchy-dns Cloudflare" -fi \ No newline at end of file diff --git a/migrations/1755139080.sh b/migrations/1755139080.sh deleted file mode 100644 index 76325707..00000000 --- a/migrations/1755139080.sh +++ /dev/null @@ -1,9 +0,0 @@ -echo "Ensure fcitx5 does not overwrite xkb layout" - -FCITX5_CONF_DIR="$HOME/.config/fcitx5/conf" -FCITX5_XCB_CONF="$FCITX5_CONF_DIR/xcb.conf" - -if [[ ! -f $FCITX5_XCB_CONF ]]; then - mkdir -p "$FCITX5_CONF_DIR" - cp "$OMARCHY_PATH/config/fcitx5/conf/xcb.conf" "$FCITX5_XCB_CONF" -fi diff --git a/migrations/1755208929.sh b/migrations/1755208929.sh deleted file mode 100644 index 527f7c0e..00000000 --- a/migrations/1755208929.sh +++ /dev/null @@ -1,4 +0,0 @@ -echo "Change behaviour of XF86PowerOff button to show omarchy system menu insead of shutting down immediately" - -source $OMARCHY_PATH/install/config/hardware/ignore-power-button.sh -setsid systemd-inhibit --what=handle-power-key --why="Temporary disable power button before restart" sleep infinity & diff --git a/migrations/1755436367.sh b/migrations/1755436367.sh deleted file mode 100644 index e7c89706..00000000 --- a/migrations/1755436367.sh +++ /dev/null @@ -1,6 +0,0 @@ -echo "Add minimal starship prompt to terminal" - -if omarchy-cmd-missing starship; then - omarchy-pkg-add starship - cp $OMARCHY_PATH/config/starship.toml ~/.config/starship.toml -fi diff --git a/migrations/1755455095.sh b/migrations/1755455095.sh deleted file mode 100644 index 2a929fe0..00000000 --- a/migrations/1755455095.sh +++ /dev/null @@ -1,3 +0,0 @@ -echo "Ensure TTE and dependencies are installed" - -omarchy-pkg-add python-poetry-core python-terminaltexteffects diff --git a/migrations/1755459930.sh b/migrations/1755459930.sh deleted file mode 100644 index 73af324c..00000000 --- a/migrations/1755459930.sh +++ /dev/null @@ -1,3 +0,0 @@ -echo "Add potentially missing dependency for power profile controls" - -omarchy-pkg-add python-gobject diff --git a/migrations/1755494432.sh b/migrations/1755494432.sh deleted file mode 100644 index ae6cbc4d..00000000 --- a/migrations/1755494432.sh +++ /dev/null @@ -1,3 +0,0 @@ -echo "Disable USB autosuspend" - -bash "$OMARCHY_PATH/install/config/hardware/usb-autosuspend.sh" diff --git a/migrations/1755507891.sh b/migrations/1755507891.sh deleted file mode 100644 index 4f933aa4..00000000 --- a/migrations/1755507891.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -echo "Migrating to use omarchy-launch-webapp and omarchy-launch-browser" -for desktop_file in ~/.local/share/applications/*.desktop; do - if grep -q 'Exec=chromium --new-window --ozone-platform=wayland --app=' "$desktop_file"; then - url=$(grep '^Exec=' "$desktop_file" | sed -n 's/.*--app="\?\([^"]*\)"\?.*/\1/p') - - if [[ -n $url ]]; then - sed -i "s|^Exec=.*|Exec=omarchy-launch-webapp \"$url\"|" "$desktop_file" - fi - fi -done - - diff --git a/migrations/1755795450.sh b/migrations/1755795450.sh deleted file mode 100644 index 3e2b3e64..00000000 --- a/migrations/1755795450.sh +++ /dev/null @@ -1,3 +0,0 @@ -echo "Ensure latest uwsm is installed" - -sudo pacman -Syu --noconfirm uwsm diff --git a/migrations/1755865046.sh b/migrations/1755865046.sh deleted file mode 100644 index c48962e5..00000000 --- a/migrations/1755865046.sh +++ /dev/null @@ -1,4 +0,0 @@ -echo "Switch from lazydocker-bin to lazydocker official" - -omarchy-pkg-drop lazydocker-bin -omarchy-pkg-add lazydocker diff --git a/migrations/1755867743.sh b/migrations/1755867743.sh deleted file mode 100644 index 4da313ab..00000000 --- a/migrations/1755867743.sh +++ /dev/null @@ -1,4 +0,0 @@ -echo "Copy Omarchy logo to ~/.config/omarchy/branding/screensaver.txt so screensaver can be personalized" - -mkdir -p ~/.config/omarchy/branding -cp $OMARCHY_PATH/logo.txt ~/.config/omarchy/branding/screensaver.txt diff --git a/migrations/1755904244.sh b/migrations/1755904244.sh deleted file mode 100644 index 4d935cf2..00000000 --- a/migrations/1755904244.sh +++ /dev/null @@ -1,6 +0,0 @@ -echo "Update fastfetch config with new Omarchy logo" - -omarchy-refresh-config fastfetch/config.jsonc - -mkdir -p ~/.config/omarchy/branding -cp $OMARCHY_PATH/icon.txt ~/.config/omarchy/branding/about.txt diff --git a/migrations/1755920552.sh b/migrations/1755920552.sh deleted file mode 100644 index 665da17c..00000000 --- a/migrations/1755920552.sh +++ /dev/null @@ -1,3 +0,0 @@ -echo "Use verbose package lists for pacman" - -sudo sed -i '/^ILoveCandy$/a VerbosePkgLists' /etc/pacman.conf diff --git a/migrations/1755930114.sh b/migrations/1755930114.sh deleted file mode 100644 index fd491d69..00000000 --- a/migrations/1755930114.sh +++ /dev/null @@ -1,5 +0,0 @@ -echo "Add new Omarchy Menu icon to Waybar" - -mkdir -p ~/.local/share/fonts -cp ~/.local/share/omarchy/config/omarchy.ttf ~/.local/share/fonts/ -fc-cache diff --git a/migrations/1756060611.sh b/migrations/1756060611.sh deleted file mode 100644 index 2aab819a..00000000 --- a/migrations/1756060611.sh +++ /dev/null @@ -1,19 +0,0 @@ -echo "Migrate AUR packages to official repos where possible" - -reinstall_package_opr() { - if omarchy-pkg-present $1; then - sudo pacman -Rns --noconfirm $1 - sudo pacman -S --noconfirm ${2:-$1} - fi -} - -omarchy-pkg-drop yay-bin-debug - -reinstall_package_opr yay-bin yay -reinstall_package_opr obsidian-bin obsidian -reinstall_package_opr localsend-bin localsend -reinstall_package_opr omarchy-chromium-bin omarchy-chromium -reinstall_package_opr python-terminaltexteffects -reinstall_package_opr tzupdate -reinstall_package_opr typora -reinstall_package_opr ttf-ia-writer diff --git a/migrations/1756115364.sh b/migrations/1756115364.sh deleted file mode 100644 index a7c3925e..00000000 --- a/migrations/1756115364.sh +++ /dev/null @@ -1,6 +0,0 @@ -echo "Replace buggy native Zoom client with webapp" - -if omarchy-pkg-present zoom; then - omarchy-pkg-drop zoom - omarchy-webapp-install "Zoom" https://app.zoom.us/wc/home https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/zoom.png -fi diff --git a/migrations/1756203383.sh b/migrations/1756203383.sh deleted file mode 100644 index 8bb2edd6..00000000 --- a/migrations/1756203383.sh +++ /dev/null @@ -1,4 +0,0 @@ -echo "Remove old About and Activity apps that are in Omarchy Menu or hotkey" - -rm -f ~/.local/share/applications/About.desktop -rm -f ~/.local/share/applications/Activity.desktop diff --git a/migrations/1756205202.sh b/migrations/1756205202.sh deleted file mode 100644 index 8d8cc73a..00000000 --- a/migrations/1756205202.sh +++ /dev/null @@ -1,7 +0,0 @@ -echo "Symlink files needed for Nautilus navigation icons" - -sudo ln -snf /usr/share/icons/Adwaita/symbolic/actions/go-previous-symbolic.svg /usr/share/icons/Yaru/scalable/actions/go-previous-symbolic.svg -sudo ln -snf /usr/share/icons/Adwaita/symbolic/actions/go-next-symbolic.svg /usr/share/icons/Yaru/scalable/actions/go-next-symbolic.svg -sudo gtk-update-icon-cache /usr/share/icons/Yaru -pkill -x nautilus || true - diff --git a/migrations/1756300740.sh b/migrations/1756300740.sh deleted file mode 100644 index adfcf60f..00000000 --- a/migrations/1756300740.sh +++ /dev/null @@ -1,3 +0,0 @@ -echo "Remove no-longer-needed sudoless package listing updates" - -sudo rm -f /etc/sudoers.d/repositories diff --git a/migrations/1756360552.sh b/migrations/1756360552.sh deleted file mode 100644 index 0ea76157..00000000 --- a/migrations/1756360552.sh +++ /dev/null @@ -1,4 +0,0 @@ -echo "Move Omarchy Package Repository after Arch core/extra/multilib and remove AUR" - -omarchy-refresh-pacman -sudo pacman -Syu --noconfirm diff --git a/migrations/1756410649.sh b/migrations/1756410649.sh deleted file mode 100644 index 7347f9b2..00000000 --- a/migrations/1756410649.sh +++ /dev/null @@ -1,7 +0,0 @@ -echo "Remove any Chaotic-AUR infrastructure packages" - -omarchy-pkg-drop chaotic-keyring chaotic-mirrorlist - -if sudo pacman-key --list-keys 3056513887B78AEB >/dev/null 2>&1; then - sudo pacman-key --delete 3056513887B78AEB -fi diff --git a/migrations/1756411333.sh b/migrations/1756411333.sh deleted file mode 100644 index 5312a6f5..00000000 --- a/migrations/1756411333.sh +++ /dev/null @@ -1,3 +0,0 @@ -echo "Use new Omarchy mirror as default" - -omarchy-refresh-pacman diff --git a/migrations/1756411865.sh b/migrations/1756411865.sh deleted file mode 100644 index 8dcf8ef2..00000000 --- a/migrations/1756411865.sh +++ /dev/null @@ -1,3 +0,0 @@ -echo "Add back ttf-ia-writer if it was missing" - -omarchy-pkg-add ttf-ia-writer diff --git a/migrations/1756491748.sh b/migrations/1756491748.sh deleted file mode 100644 index 882a9c32..00000000 --- a/migrations/1756491748.sh +++ /dev/null @@ -1,6 +0,0 @@ -echo "Removing UseDNS=no from network files to fix DNS issue" - -for file in /etc/systemd/network/*.network; do - [[ -f $file ]] || continue - sudo sed -i '/^UseDNS=no/d' "$file" -done \ No newline at end of file diff --git a/migrations/1756494998.sh b/migrations/1756494998.sh deleted file mode 100644 index 1ffe1e8e..00000000 --- a/migrations/1756494998.sh +++ /dev/null @@ -1,5 +0,0 @@ -echo "Remove opacity from alacritty.toml so Hyprland can control fully" - -if [[ -f ~/.config/alacritty/alacritty.toml ]]; then - sed -i '/opacity = 0.98/d' ~/.config/alacritty/alacritty.toml -fi diff --git a/migrations/1756507384.sh b/migrations/1756507384.sh deleted file mode 100644 index 77c640e8..00000000 --- a/migrations/1756507384.sh +++ /dev/null @@ -1,4 +0,0 @@ -echo "Replace JetBrains Mono font with the Nerd Font edition" - -omarchy-pkg-add ttf-jetbrains-mono-nerd -omarchy-pkg-drop ttf-jetbrains-mono diff --git a/migrations/1756556731.sh b/migrations/1756556731.sh deleted file mode 100644 index 477b754c..00000000 --- a/migrations/1756556731.sh +++ /dev/null @@ -1,3 +0,0 @@ -echo "Add Samba network drive support to the file manager" - -omarchy-pkg-add gvfs-smb diff --git a/migrations/1756629295.sh b/migrations/1756629295.sh deleted file mode 100644 index 8f0bea6d..00000000 --- a/migrations/1756629295.sh +++ /dev/null @@ -1,3 +0,0 @@ -echo "Ensure qt5-wayland is installed so KeepassXC, Nextcloud, Sqlite Browser, and other apps display correctly" - -omarchy-pkg-add qt5-wayland diff --git a/migrations/1756642681.sh b/migrations/1756642681.sh deleted file mode 100644 index a3d381de..00000000 --- a/migrations/1756642681.sh +++ /dev/null @@ -1,3 +0,0 @@ -echo "Fix audio input on AMD Framework laptops" - -source $OMARCHY_PATH/install/config/hardware/framework/fix-f13-amd-audio-input.sh || true diff --git a/migrations/1756650507.sh b/migrations/1756650507.sh deleted file mode 100644 index 7ed6cec7..00000000 --- a/migrations/1756650507.sh +++ /dev/null @@ -1,5 +0,0 @@ -echo "Fix JetBrains font setting" - -if [[ $(omarchy-font-current) == JetBrains* ]]; then - omarchy-font-set "JetBrainsMono Nerd Font" -fi diff --git a/migrations/1756911131.sh b/migrations/1756911131.sh deleted file mode 100644 index 6747ab06..00000000 --- a/migrations/1756911131.sh +++ /dev/null @@ -1,11 +0,0 @@ -echo "Enable UFW systemd service for existing installations" - -if omarchy-cmd-present ufw; then - if sudo ufw status | grep -q "Status: active\|22/tcp\|53317"; then - if ! systemctl is-enabled ufw >/dev/null 2>&1; then - sudo systemctl enable ufw --now - echo "UFW systemd service enabled" - fi - fi -fi - diff --git a/migrations/1757021485.sh b/migrations/1757021485.sh deleted file mode 100644 index ab524755..00000000 --- a/migrations/1757021485.sh +++ /dev/null @@ -1,3 +0,0 @@ -echo "Install Copy URL extension for Chromium" - -omarchy-refresh-chromium diff --git a/migrations/1757147211.sh b/migrations/1757147211.sh deleted file mode 100644 index f74afe57..00000000 --- a/migrations/1757147211.sh +++ /dev/null @@ -1,7 +0,0 @@ -echo "Create managed policy directories for Chromium and Brave for theme switching" - -sudo mkdir -p /etc/chromium/policies/managed -sudo chmod a+rw /etc/chromium/policies/managed - -sudo mkdir -p /etc/brave/policies/managed -sudo chmod a+rw /etc/brave/policies/managed diff --git a/migrations/1757361127.sh b/migrations/1757361127.sh deleted file mode 100644 index de0d6ed8..00000000 --- a/migrations/1757361127.sh +++ /dev/null @@ -1,8 +0,0 @@ -echo "Fix DHCP DNS to allow VPN DNS override" - -if [[ -f /etc/systemd/resolved.conf ]]; then - if grep -q "^DNS=$" /etc/systemd/resolved.conf && grep -q "^FallbackDNS=$" /etc/systemd/resolved.conf; then - sudo sed -i '/^DNS=$/d; /^FallbackDNS=$/d' /etc/systemd/resolved.conf - sudo systemctl restart systemd-resolved - fi -fi \ No newline at end of file diff --git a/migrations/1757361128.sh b/migrations/1757361128.sh deleted file mode 100644 index 0bd0b407..00000000 --- a/migrations/1757361128.sh +++ /dev/null @@ -1,7 +0,0 @@ -echo "Enable mDNS resolution for existing Avahi installations" - -if systemctl is-enabled avahi-daemon.service >/dev/null 2>&1; then - if ! grep -q "mdns_minimal" /etc/nsswitch.conf; then - sudo sed -i 's/^hosts:.*/hosts: mymachines mdns_minimal [NOTFOUND=return] resolve files myhostname dns/' /etc/nsswitch.conf - fi -fi \ No newline at end of file diff --git a/migrations/1757435811.sh b/migrations/1757435811.sh deleted file mode 100644 index 8961559d..00000000 --- a/migrations/1757435811.sh +++ /dev/null @@ -1,3 +0,0 @@ -echo "Copy Omarchy default app icons to .local/share/icons" - -source $OMARCHY_PATH/install/packaging/icons.sh diff --git a/migrations/1757435812.sh b/migrations/1757435812.sh deleted file mode 100644 index 14b308aa..00000000 --- a/migrations/1757435812.sh +++ /dev/null @@ -1,6 +0,0 @@ -echo "Update Zoom webapp to handle zoommtg:// and zoomus:// protocol links" - -if [[ -f ~/.local/share/applications/Zoom.desktop ]]; then - omarchy-webapp-remove Zoom - omarchy-webapp-install Zoom https://app.zoom.us/wc/home Zoom.png "omarchy-webapp-handler-zoom %u" "x-scheme-handler/zoommtg;x-scheme-handler/zoomus" -fi diff --git a/migrations/1757483378.sh b/migrations/1757483378.sh deleted file mode 100644 index a0c8d1bb..00000000 --- a/migrations/1757483378.sh +++ /dev/null @@ -1,4 +0,0 @@ -echo "6Ghz Wi-Fi + Intel graphics acceleration for existing installations" - -bash "$OMARCHY_PATH/install/config/hardware/set-wireless-regdom.sh" -bash "$OMARCHY_PATH/install/config/hardware/intel/video-acceleration.sh" diff --git a/migrations/1757535736.sh b/migrations/1757535736.sh deleted file mode 100644 index 25fcd190..00000000 --- a/migrations/1757535736.sh +++ /dev/null @@ -1,9 +0,0 @@ -echo "Enabling vim keys in btop" - -CONFIG_FILE=~/.config/btop/btop.conf - -if [[ -f $CONFIG_FILE ]]; then - if grep -q "^vim_keys = " "$CONFIG_FILE"; then - sed -i 's/^vim_keys = False/vim_keys = True/' "$CONFIG_FILE" - fi -fi diff --git a/migrations/1757783204.sh b/migrations/1757783204.sh deleted file mode 100644 index e5cc9b90..00000000 --- a/migrations/1757783204.sh +++ /dev/null @@ -1,9 +0,0 @@ -echo "Create ~/Work with ./bin in the path for contained projects" - -mise_config="$HOME/Work/.mise.toml" - -if [[ -f $mise_config ]]; then - cp $mise_config "$mise_config.bak.$(date +%s)" -fi - -source "$OMARCHY_PATH/install/config/mise-work.sh" diff --git a/migrations/1757879836.sh b/migrations/1757879836.sh deleted file mode 100644 index 553b6e55..00000000 --- a/migrations/1757879836.sh +++ /dev/null @@ -1,5 +0,0 @@ -echo "Ensure .config/hypr/looknfeel.lua is available" - -if [[ ! -f ~/.config/hypr/looknfeel.lua ]]; then - cp "$OMARCHY_PATH/config/hypr/looknfeel.lua" ~/.config/hypr/looknfeel.lua -fi diff --git a/migrations/1758019332.sh b/migrations/1758019332.sh deleted file mode 100644 index 09a39207..00000000 --- a/migrations/1758019332.sh +++ /dev/null @@ -1,6 +0,0 @@ -echo "Set \$TERMINAL and \$EDITOR in ~/.config/uwsm/default so entire system can rely on it" - -# Set terminal and editor default in uwsm -omarchy-refresh-config uwsm/default -omarchy-refresh-config uwsm/env -omarchy-state set reboot-required diff --git a/migrations/1758051607.sh b/migrations/1758051607.sh deleted file mode 100644 index e30cae7f..00000000 --- a/migrations/1758051607.sh +++ /dev/null @@ -1,11 +0,0 @@ -echo "Copy configs for ghostty + kitty so they're available as alternative terminal options" - -if [[ ! -f ~/.config/ghostty/config ]]; then - mkdir -p ~/.config/ghostty - cp -Rpf $OMARCHY_PATH/config/ghostty/config ~/.config/ghostty/config -fi - -if [[ ! -f ~/.config/kitty/kitty.conf ]]; then - mkdir -p ~/.config/kitty - cp -Rpf $OMARCHY_PATH/config/kitty/kitty.conf ~/.config/kitty/kitty.conf -fi diff --git a/migrations/1758104201.sh b/migrations/1758104201.sh deleted file mode 100644 index 18ac7015..00000000 --- a/migrations/1758104201.sh +++ /dev/null @@ -1,3 +0,0 @@ -echo "Prevent powerprofilesctl from using Mise python and not working" - -bash $OMARCHY_PATH/install/config/fix-powerprofilesctl-shebang.sh diff --git a/migrations/1758111304.sh b/migrations/1758111304.sh deleted file mode 100644 index 75f4dbb9..00000000 --- a/migrations/1758111304.sh +++ /dev/null @@ -1,3 +0,0 @@ -echo "Remove Ruby build options to force GCC14 now that GCC15 is compatible" - -mise settings unset ruby.ruby_build_opts diff --git a/migrations/1758142943.sh b/migrations/1758142943.sh deleted file mode 100644 index e9ed7944..00000000 --- a/migrations/1758142943.sh +++ /dev/null @@ -1,21 +0,0 @@ -echo "Turn off VSCode's own auto-update feature (we rely on pacman)" - -# Note: We cannot use `jq` to update settings.json because it’s JSONC (allows comments), -# which jq doesn’t support. - -VS_CODE_SETTINGS="$HOME/.config/Code/User/settings.json" - -# If VSCode is installed, ensure that the "update.mode" setting is set to "none" -if omarchy-cmd-present code; then - mkdir -p "$(dirname "$VS_CODE_SETTINGS")" - - if [[ ! -f $VS_CODE_SETTINGS ]]; then - # If settings.json doesn't exist, create it with just the update.mode setting - printf '{\n "update.mode": "none"\n}\n' > "$VS_CODE_SETTINGS" - elif ! grep -q '"update.mode"' "$VS_CODE_SETTINGS"; then - # Insert "update.mode": "none", immediately after the first "{" - # Use sed's first-match range (0,/{/) to only replace the first "{ - sed -i --follow-symlinks -E '0,/\{/{s/\{/{\ - "update.mode": "none",/}' "$VS_CODE_SETTINGS" - fi -fi diff --git a/migrations/1758436991.sh b/migrations/1758436991.sh deleted file mode 100644 index d8ae9ebb..00000000 --- a/migrations/1758436991.sh +++ /dev/null @@ -1,16 +0,0 @@ -echo "Fix Disk Usage and Docker TUIs" - -APP_DIR="$HOME/.local/share/applications" -ICON_DIR="$APP_DIR/icons" - -# Don't use omarchy-tui-remove to preserve icons - -if [[ -f $APP_DIR/Docker.desktop ]]; then - rm "$APP_DIR/Docker.desktop" - omarchy-tui-install "Docker" "lazydocker" tile "$ICON_DIR/Docker.png" -fi - -if [[ -f $APP_DIR/"Disk Usage.desktop" ]]; then - rm "$APP_DIR/Disk Usage.desktop" - omarchy-tui-install "Disk Usage" "bash -c 'dust -r; read -n 1 -s'" float "$ICON_DIR/Disk Usage.png" -fi diff --git a/migrations/1758455816.sh b/migrations/1758455816.sh deleted file mode 100644 index 9c578ffe..00000000 --- a/migrations/1758455816.sh +++ /dev/null @@ -1,13 +0,0 @@ -echo "Add thunderbolt support to boot image" - -omarchy-pkg-add bolt - -if [[ ! -f /etc/mkinitcpio.conf.d/thunderbolt_module.conf ]]; then - sudo tee /etc/mkinitcpio.conf.d/thunderbolt_module.conf </dev/null -MODULES+=(thunderbolt) -EOF -fi - -if omarchy-cmd-present limine-update; then - sudo limine-update -fi diff --git a/migrations/1758487660_change_dm_to_sddm.sh b/migrations/1758487660_change_dm_to_sddm.sh deleted file mode 100644 index 3c10c840..00000000 --- a/migrations/1758487660_change_dm_to_sddm.sh +++ /dev/null @@ -1,55 +0,0 @@ -#!/bin/bash -set -e - -error_exit() { - echo -e "\033[31mERROR: Migration failed! Manual intervention required.\033[0m" >&2 - echo -e "\033[31mDO NOT REBOOT - System may be in inconsistent state until the error is fixed.\033[0m" >&2 - exit 1 -} - -trap error_exit ERR - -echo "Change display manager to SDDM" - -omarchy-pkg-add sddm libsecret gnome-keyring || error_exit - -sudo mkdir -p /etc/sddm.conf.d - -cat </dev/null 2>&1; then - echo -e "\033[31mError: omarchy-seamless-login.service is still enabled\033[0m" >&2 - error_exit -fi - -if systemctl is-masked plymouth-quit-wait.service >/dev/null 2>&1; then - echo -e "\033[31mError: plymouth-quit-wait.service is still masked\033[0m" >&2 - error_exit -fi - -if ! systemctl is-enabled getty@tty1.service >/dev/null 2>&1; then - echo -e "\033[31mError: getty@tty1.service is not enabled\033[0m" >&2 - error_exit -fi - -if ! systemctl is-enabled sddm.service >/dev/null 2>&1; then - echo -e "\033[31mError: sddm.service is not enabled\033[0m" >&2 - error_exit -fi - -sudo rm -f /usr/local/bin/seamless-login -sudo rm -f /etc/systemd/system/plymouth-quit.service.d/wait-for-graphical.conf -sudo rm -f /etc/systemd/system/omarchy-seamless-login.service diff --git a/migrations/1758487662_move_to_custom_uki.sh b/migrations/1758487662_move_to_custom_uki.sh deleted file mode 100644 index a29376d8..00000000 --- a/migrations/1758487662_move_to_custom_uki.sh +++ /dev/null @@ -1,38 +0,0 @@ -echo "Update UKI to custom named entry" - -if command -v limine &>/dev/null && [[ -f /etc/default/limine ]]; then - if grep -q "^ENABLE_UKI=yes" /etc/default/limine; then - if ! grep -q "^CUSTOM_UKI_NAME=" /etc/default/limine; then - sudo sed -i '/^ENABLE_UKI=yes/a CUSTOM_UKI_NAME="omarchy"' /etc/default/limine - fi - - # Remove the archinstall-created Limine entry - while IFS= read -r bootnum; do - sudo efibootmgr -b "$bootnum" -B >/dev/null 2>&1 - done < <(efibootmgr | grep -E "^Boot[0-9]{4}\*? Arch Linux Limine" | sed 's/^Boot\([0-9]\{4\}\).*/\1/') - - sudo limine-update - - uki_file=$(find /boot/EFI/Linux/ -name "omarchy*.efi" -printf "%f\n" 2>/dev/null | head -1) - - if [[ -n $uki_file ]]; then - while IFS= read -r bootnum; do - sudo efibootmgr -b "$bootnum" -B >/dev/null 2>&1 - done < <(efibootmgr | grep -E "^Boot[0-9]{4}\*? Omarchy" | sed 's/^Boot\([0-9]\{4\}\).*/\1/') - - # Skip EFI entry creation on Apple hardware - if ! cat /sys/class/dmi/id/bios_vendor 2>/dev/null | grep -qi "Apple"; then - sudo efibootmgr --create \ - --disk "$(findmnt -n -o SOURCE /boot | sed 's/p\?[0-9]*$//')" \ - --part "$(findmnt -n -o SOURCE /boot | grep -o 'p\?[0-9]*$' | sed 's/^p//')" \ - --label "Omarchy" \ - --loader "\\EFI\\Linux\\$uki_file" - fi - fi - else - echo "Not using UKI. Not making any changes." - fi -else - echo "Boot config is non-standard. Not making any changes." -fi - diff --git a/migrations/1758562032.sh b/migrations/1758562032.sh deleted file mode 100644 index 5c4c357e..00000000 --- a/migrations/1758562032.sh +++ /dev/null @@ -1,5 +0,0 @@ -echo "Fix Tailscale split DNS compatibility by removing [!UNAVAIL=return] from nsswitch.conf" - -if grep -q '\[!UNAVAIL=return\]' /etc/nsswitch.conf; then - sudo sed -i 's/resolve \[!UNAVAIL=return\]/resolve/g' /etc/nsswitch.conf -fi \ No newline at end of file diff --git a/migrations/1758734243.sh b/migrations/1758734243.sh deleted file mode 100644 index a264567e..00000000 --- a/migrations/1758734243.sh +++ /dev/null @@ -1,3 +0,0 @@ -echo "Install tesseract OCR and language data files" - -omarchy-pkg-add tesseract tesseract-data-eng \ No newline at end of file diff --git a/migrations/1759355846.sh b/migrations/1759355846.sh deleted file mode 100644 index 40d0098d..00000000 --- a/migrations/1759355846.sh +++ /dev/null @@ -1,21 +0,0 @@ -echo "Symlink systemd-resolved to /etc/resolv.conf" - -# Backup if /etc/resolv.conf was modified after system birth -system_birth=$(stat -c %W /) -resolvconf_modified=$(stat -c %Y /etc/resolv.conf) - -# Run a backup if resolv.conf isn't a symlink and was modified after install -if [[ -s /etc/resolv.conf ]] && [[ ! -L /etc/resolv.conf ]] && [[ $resolvconf_modified > $system_birth ]]; then - # Backup the destination file (with timestamp) to avoid clobbering (Ex: resolv.conf.bak.1753817951) - backup_file="/etc/resolv.conf.bak.$(date +%s)" - - # Create backup - sudo cp -f /etc/resolv.conf "$backup_file" 2>/dev/null - - # Inform users - echo -e "\e[31mReplaced /etc/resolv.conf with symlink to systemd-resolved. \nSaved backup as ${backup_file}.\e[0m" - echo -e "\e[31mSee https://wiki.archlinux.org/title/Systemd-resolved.\e[0m" -fi - -# Write the symlink -sudo ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf diff --git a/migrations/1759691413.sh b/migrations/1759691413.sh deleted file mode 100644 index 37fefa7c..00000000 --- a/migrations/1759691413.sh +++ /dev/null @@ -1,5 +0,0 @@ -echo "Correct path for sudoless asdcontrol for working Apple Display hotkeys" - -if [[ $(command -v asdcontrol) == "/usr/bin/asdcontrol" ]]; then - echo "$USER ALL=(ALL) NOPASSWD: /usr/bin/asdcontrol" | sudo tee /etc/sudoers.d/asdcontrol -fi diff --git a/migrations/1759895423.sh b/migrations/1759895423.sh deleted file mode 100644 index fcaeb417..00000000 --- a/migrations/1759895423.sh +++ /dev/null @@ -1,10 +0,0 @@ -echo "Make shift+insert paste and ctrl+insert copy from clipboard in terminal" - -# Add keybindings to Alacritty -sed -i 's/{ key = "F11", action = "ToggleFullscreen" }/{ key = "F11", action = "ToggleFullscreen" },\n{ key = "Insert", mods = "Shift", action = "Paste" },\n{ key = "Insert", mods = "Control", action = "Copy" }/' ~/.config/alacritty/alacritty.toml - -# Add keybindings to Ghostty -sed -i '/keybind = f11=toggle_fullscreen/a keybind = shift+insert=paste_from_clipboard\nkeybind = control+insert=copy_to_clipboard' ~/.config/ghostty/config - -# Add keybindings to Kitty -sed -i '/map F11 toggle_fullscreen/a map ctrl+insert copy_to_clipboard' ~/.config/kitty/kitty.conf diff --git a/migrations/1759913695.sh b/migrations/1759913695.sh deleted file mode 100644 index 9b7ddc1b..00000000 --- a/migrations/1759913695.sh +++ /dev/null @@ -1,3 +0,0 @@ -echo "Fix NVMe suspend issues on MacBook models" - -bash $OMARCHY_PATH/install/config/hardware/apple/fix-suspend-nvme.sh diff --git a/migrations/1760144906.sh b/migrations/1760144906.sh deleted file mode 100644 index 4745b187..00000000 --- a/migrations/1760144906.sh +++ /dev/null @@ -1,5 +0,0 @@ -echo "Change omarchy-screenrecord to use gpu-screen-recorder" -omarchy-pkg-drop wf-recorder wl-screenrec - -# Add slurp in case it hadn't been picked up from an old migration -omarchy-pkg-add slurp gpu-screen-recorder diff --git a/migrations/1760301290.sh b/migrations/1760301290.sh deleted file mode 100644 index b383b6fb..00000000 --- a/migrations/1760301290.sh +++ /dev/null @@ -1,5 +0,0 @@ -echo "Add the new Flexoki Light theme" - -if [[ ! -L ~/.config/omarchy/themes/flexoki-light ]]; then - ln -nfs ~/.local/share/omarchy/themes/flexoki-light ~/.config/omarchy/themes/ -fi diff --git a/migrations/1760304963.sh b/migrations/1760304963.sh deleted file mode 100644 index 588d4f46..00000000 --- a/migrations/1760304963.sh +++ /dev/null @@ -1,9 +0,0 @@ -echo "Add a default keyring for gnome-keyring that unlocks on login" - -if [[ -f $HOME/.local/share/keyrings/Default_keyring.keyring ]] || [[ -f $HOME/.local/share/keyrings/default ]]; then - if gum confirm "Do you want to replace existing keyring with one that's auto-unlocked on login?"; then - bash "$OMARCHY_PATH/install/login/default-keyring.sh" - fi -else - bash "$OMARCHY_PATH/install/login/default-keyring.sh" -fi diff --git a/migrations/1760434895.sh b/migrations/1760434895.sh deleted file mode 100644 index e08649f4..00000000 --- a/migrations/1760434895.sh +++ /dev/null @@ -1,6 +0,0 @@ -echo "Change to omarchy-nvim package" -omarchy-pkg-drop omarchy-lazyvim -omarchy-pkg-add omarchy-nvim - -# Will trigger to overwrite configs or not to pickup new hot-reload themes -omarchy-nvim-setup diff --git a/migrations/1760441237.sh b/migrations/1760441237.sh deleted file mode 100644 index 1c2d89d3..00000000 --- a/migrations/1760441237.sh +++ /dev/null @@ -1,3 +0,0 @@ -echo "Install Omarchy theme on Obsidian vaults" - -omarchy-theme-set-obsidian diff --git a/migrations/1760471009.sh b/migrations/1760471009.sh deleted file mode 100644 index f2418846..00000000 --- a/migrations/1760471009.sh +++ /dev/null @@ -1,5 +0,0 @@ -echo "Copy over updated application icons" - -cp -f $OMARCHY_PATH/applications/icons/GitHub.png ~/.local/share/applications/icons/ -cp -f $OMARCHY_PATH/applications/icons/ChatGPT.png ~/.local/share/applications/icons/ -cp -f $OMARCHY_PATH/applications/icons/X.png ~/.local/share/applications/icons/ diff --git a/migrations/1760684828.sh b/migrations/1760684828.sh deleted file mode 100644 index e8bae598..00000000 --- a/migrations/1760684828.sh +++ /dev/null @@ -1,3 +0,0 @@ -echo "Remove any active eza theme" - -rm -f ~/.config/eza/theme.yml diff --git a/migrations/1760724934.sh b/migrations/1760724934.sh deleted file mode 100644 index e6cb685c..00000000 --- a/migrations/1760724934.sh +++ /dev/null @@ -1,23 +0,0 @@ -# Handles changes since 3.1.0-RC - -echo "Add shift+insert for kitty" -# Add shift+insert paste keybinding to kitty.conf if it doesn't exist -KITTY_CONF="$HOME/.config/kitty/kitty.conf" - -if ! grep -q "map shift+insert paste_from_clipboard" "$KITTY_CONF"; then - sed -i '/map ctrl+insert copy_to_clipboard/a map shift+insert paste_from_clipboard' "$KITTY_CONF" -fi - -echo "Copy hooks examples" -cp -r $OMARCHY_PATH/config/omarchy/* $HOME/.config/omarchy/ - -echo "Add packages for updated omarchy-capture-screenshot" -omarchy-pkg-add grim slurp - -echo "Add nfs support by default to Nautilus" -omarchy-pkg-add gvfs-nfs - -if [[ ! -d $HOME/.config/nvim ]]; then - echo "Add missing nvim config" - omarchy-nvim-setup -fi diff --git a/migrations/1760730253.sh b/migrations/1760730253.sh deleted file mode 100644 index a67a0063..00000000 --- a/migrations/1760730253.sh +++ /dev/null @@ -1,3 +0,0 @@ -echo "Install Aether for Omarchy theme creation" - -omarchy-pkg-add aether diff --git a/migrations/1761180745.sh b/migrations/1761180745.sh deleted file mode 100644 index c0e31eb5..00000000 --- a/migrations/1761180745.sh +++ /dev/null @@ -1,7 +0,0 @@ -echo "Ensure interactive shell check is at the top of .bashrc" - -BASHRC="$HOME/.bashrc" - -if [[ -f $BASHRC ]] && ! grep -q '\[\[ $- != \*i\* \]\] && return' "$BASHRC"; then - sed -i '1i# If not running interactively, don'\''t do anything (leave this at the top of this file)\n[[ $- != *i* ]] && return\n' "$BASHRC" -fi diff --git a/migrations/1761241493.sh b/migrations/1761241493.sh deleted file mode 100644 index c4b977f0..00000000 --- a/migrations/1761241493.sh +++ /dev/null @@ -1,33 +0,0 @@ -echo "Cleanup extra UKI if needed to prevent errors" -if [[ -f /boot/EFI/linux/omarchy_linux.efi ]] && [[ -f /boot/EFI/linux/$(cat /etc/machine-id)_linux.efi ]]; then - sudo rm -f /boot/EFI/Linux/$(cat /etc/machine-id)_linux.efi - - if grep -q "/boot/EFI/Linux/$(cat /etc/machine-id)_linux.efi" /boot/limine.conf; then - echo -e "Resetting limine config\n(you may need to re-add other entries via sudo limine-update)" - - sudo mv /boot/limine.conf /boot/limine.conf.bak - sudo tee /boot/limine.conf </dev/null -### Read more at config document: https://github.com/limine-bootloader/limine/blob/trunk/CONFIG.md -#timeout: 3 -default_entry: 2 -interface_branding: Omarchy Bootloader -interface_branding_color: 2 -hash_mismatch_panic: no - -term_background: 1a1b26 -backdrop: 1a1b26 - -# Terminal colors (Tokyo Night palette) -term_palette: 15161e;f7768e;9ece6a;e0af68;7aa2f7;bb9af7;7dcfff;a9b1d6 -term_palette_bright: 414868;f7768e;9ece6a;e0af68;7aa2f7;bb9af7;7dcfff;c0caf5 - -# Text colors -term_foreground: c0caf5 -term_foreground_bright: c0caf5 -term_background_bright: 24283b - -EOF - sudo limine-update - sudo limine-snapper-sync - fi -fi diff --git a/migrations/1761247569.sh b/migrations/1761247569.sh deleted file mode 100644 index eff3980d..00000000 --- a/migrations/1761247569.sh +++ /dev/null @@ -1,2 +0,0 @@ -echo "Install expac and inxi for omarchy-debug" -omarchy-pkg-add expac inxi diff --git a/migrations/1761274806.sh b/migrations/1761274806.sh deleted file mode 100644 index 7d0f5657..00000000 --- a/migrations/1761274806.sh +++ /dev/null @@ -1,5 +0,0 @@ -echo "Ensure node is available via mise (for treesitter cli)" - -if omarchy-cmd-missing node; then - mise use -g node@latest -fi diff --git a/migrations/1761274980.sh b/migrations/1761274980.sh deleted file mode 100644 index 5c85b362..00000000 --- a/migrations/1761274980.sh +++ /dev/null @@ -1,11 +0,0 @@ -echo "Migrate to proper packages for localsend and asdcontrol" - -if omarchy-pkg-present localsend-bin; then - omarchy-pkg-drop localsend-bin - omarchy-pkg-add localsend -fi - -if omarchy-pkg-present asdcontrol-git; then - omarchy-pkg-drop asdcontrol-git - omarchy-pkg-add asdcontrol -fi diff --git a/migrations/1761585764.sh b/migrations/1761585764.sh deleted file mode 100644 index bafbfe27..00000000 --- a/migrations/1761585764.sh +++ /dev/null @@ -1,3 +0,0 @@ -echo "Disable Nvim news alerts box" - -cp /usr/share/omarchy-nvim/config/lua/plugins/disable-news-alert.lua ~/.config/nvim/lua/plugins/disable-news-alert.lua diff --git a/migrations/1761638377.sh b/migrations/1761638377.sh deleted file mode 100644 index 05a1fb16..00000000 --- a/migrations/1761638377.sh +++ /dev/null @@ -1,6 +0,0 @@ -echo "Turn off fcitx5 clipboard that is interferring with other applications" - -mkdir -p ~/.config/fcitx5/conf -cp $OMARCHY_PATH/config/fcitx5/conf/clipboard.conf ~/.config/fcitx5/conf/ - -omarchy-restart-xcompose diff --git a/migrations/1761758552.sh b/migrations/1761758552.sh deleted file mode 100644 index 49680d09..00000000 --- a/migrations/1761758552.sh +++ /dev/null @@ -1,21 +0,0 @@ -echo "Set nvim as default via xdg-mime" - -rm ~/.local/share/applications/nvim.desktop || true - -xdg-mime default nvim.desktop text/plain -xdg-mime default nvim.desktop text/english -xdg-mime default nvim.desktop text/x-makefile -xdg-mime default nvim.desktop text/x-c++hdr -xdg-mime default nvim.desktop text/x-c++src -xdg-mime default nvim.desktop text/x-chdr -xdg-mime default nvim.desktop text/x-csrc -xdg-mime default nvim.desktop text/x-java -xdg-mime default nvim.desktop text/x-moc -xdg-mime default nvim.desktop text/x-pascal -xdg-mime default nvim.desktop text/x-tcl -xdg-mime default nvim.desktop text/x-tex -xdg-mime default nvim.desktop application/x-shellscript -xdg-mime default nvim.desktop text/x-c -xdg-mime default nvim.desktop text/x-c++ -xdg-mime default nvim.desktop application/xml -xdg-mime default nvim.desktop text/xml diff --git a/migrations/1761897226.sh b/migrations/1761897226.sh deleted file mode 100644 index e72f2a8a..00000000 --- a/migrations/1761897226.sh +++ /dev/null @@ -1,4 +0,0 @@ -echo "Install Copy URL extension for Brave" - -mkdir -p ~/.config -cp "$OMARCHY_PATH/config/chromium-flags.conf" ~/.config/brave-flags.conf diff --git a/migrations/1762121828.sh b/migrations/1762121828.sh deleted file mode 100644 index 58b5f041..00000000 --- a/migrations/1762121828.sh +++ /dev/null @@ -1,36 +0,0 @@ -echo "Setting up xdg-terminal-exec for gtk-launch terminal support" -# Solve for hardcoded glib terminals -# https://github.com/basecamp/omarchy/issues/1852 - -# Remove old symlink if it exists -- if someone ran the previous migration early -if [[ -L /usr/local/bin/xdg-terminal-exec ]]; then - sudo rm /usr/local/bin/xdg-terminal-exec -fi - -omarchy-pkg-add xdg-terminal-exec - -# Set up xdg-terminals.list based on current $TERMINAL -if [[ -n $TERMINAL ]]; then - case "$TERMINAL" in - alacritty) desktop_id="Alacritty.desktop" ;; - ghostty) desktop_id="com.mitchellh.ghostty.desktop" ;; - kitty) desktop_id="kitty.desktop" ;; - esac - - if [[ -n $desktop_id ]]; then - mkdir -p ~/.config - cat > ~/.config/xdg-terminals.list << EOF -# Terminal emulator preference order for xdg-terminal-exec -# The first found and valid terminal will be used -$desktop_id -EOF - fi -fi - -# Copy custom desktop entries with proper X-TerminalArg* keys -if command -v alacritty > /dev/null 2>&1; then - cp "$OMARCHY_PATH/applications/Alacritty.desktop" ~/.local/share/applications/ -fi - -# Update TERMINAL variable in uwsm config -sed -i 's/export TERMINAL=.*/export TERMINAL=xdg-terminal-exec/' ~/.config/uwsm/default diff --git a/migrations/1762156000.sh b/migrations/1762156000.sh deleted file mode 100644 index 266daf38..00000000 --- a/migrations/1762156000.sh +++ /dev/null @@ -1,3 +0,0 @@ -echo "Drop wayfreeze as hyprpicker replaces its function" - -omarchy-pkg-drop wayfreeze-git wayfreeze diff --git a/migrations/1762417304.sh b/migrations/1762417304.sh deleted file mode 100644 index 3678ffd5..00000000 --- a/migrations/1762417304.sh +++ /dev/null @@ -1,3 +0,0 @@ -echo "Drop bluetooth GUI" - -omarchy-pkg-drop blueberry diff --git a/migrations/1762446739.sh b/migrations/1762446739.sh deleted file mode 100644 index c58de3f5..00000000 --- a/migrations/1762446739.sh +++ /dev/null @@ -1,12 +0,0 @@ -echo "Remove alternative limine.conf files" - -if omarchy-cmd-present limine; then - if [[ ! -f /boot/limine.conf ]]; then - echo "Error: /boot/limine.conf does not exist. Do not reboot without resolving this issue!" - exit 1 - fi - - sudo rm -f /boot/EFI/limine/limine.conf - sudo rm -f /boot/EFI/BOOT/limine.conf - sudo rm -f /boot/limine/limine.conf -fi diff --git a/migrations/1762711005.sh b/migrations/1762711005.sh deleted file mode 100644 index 0ebf1d8a..00000000 --- a/migrations/1762711005.sh +++ /dev/null @@ -1,3 +0,0 @@ -echo "Add usage package to provide tab completion for mise" - -omarchy-pkg-add usage diff --git a/migrations/1762768186.sh b/migrations/1762768186.sh deleted file mode 100644 index 93bc3634..00000000 --- a/migrations/1762768186.sh +++ /dev/null @@ -1,3 +0,0 @@ -echo "Ensure config/uwsm/default uses generic terminal exec" - -sed -i 's/export TERMINAL=.*/export TERMINAL=xdg-terminal-exec/' ~/.config/uwsm/default diff --git a/migrations/1762770442.sh b/migrations/1762770442.sh deleted file mode 100644 index f312b393..00000000 --- a/migrations/1762770442.sh +++ /dev/null @@ -1,5 +0,0 @@ -echo "Slow down Ghostty mouse scrolling to match Alacritty" - -if ! grep -q "mouse-scroll-multiplier" ~/.config/ghostty/config; then - echo -e "\n# Slowdown mouse scrolling\nmouse-scroll-multiplier = 0.95" >> ~/.config/ghostty/config -fi diff --git a/migrations/1762770815.sh b/migrations/1762770815.sh deleted file mode 100644 index 36e6a4b4..00000000 --- a/migrations/1762770815.sh +++ /dev/null @@ -1,3 +0,0 @@ -echo "Pull packages from stable Arch mirror" - -omarchy-refresh-pacman diff --git a/migrations/1762781907.sh b/migrations/1762781907.sh deleted file mode 100644 index 8291dd0f..00000000 --- a/migrations/1762781907.sh +++ /dev/null @@ -1,4 +0,0 @@ -echo "Add try command for managing quick code experiments" - -omarchy-pkg-add ruby tobi-try -mkdir -p ~/Work/tries diff --git a/migrations/1763409182.sh b/migrations/1763409182.sh deleted file mode 100644 index 74199ce4..00000000 --- a/migrations/1763409182.sh +++ /dev/null @@ -1,3 +0,0 @@ -echo "Install exfatprogs to support exfat in format-drive" - -omarchy-pkg-add exfatprogs diff --git a/migrations/1763478660.sh b/migrations/1763478660.sh deleted file mode 100644 index f7eec943..00000000 --- a/migrations/1763478660.sh +++ /dev/null @@ -1,4 +0,0 @@ -echo "Configure XDPH config for screensharing to remember token selection" - -cp $OMARCHY_PATH/config/hypr/xdph.conf ~/.config/hypr/ -systemctl --user restart xdg-desktop-portal-hyprland diff --git a/migrations/1763558828.sh b/migrations/1763558828.sh deleted file mode 100644 index 3da9eec0..00000000 --- a/migrations/1763558828.sh +++ /dev/null @@ -1,28 +0,0 @@ -echo "Make Alacritty compatible with X-TerminalArgs" - -if omarchy-pkg-present alacritty; then - mkdir -p ~/.local/share/applications - cat > ~/.local/share/applications/Alacritty.desktop << EOF -[Desktop Entry] -Type=Application -TryExec=alacritty -Exec=alacritty -Icon=Alacritty -Terminal=false -Categories=System;TerminalEmulator; -Name=Alacritty -GenericName=Terminal -Comment=A fast, cross-platform, OpenGL terminal emulator -StartupNotify=true -StartupWMClass=Alacritty -Actions=New; -X-TerminalArgExec=-e -X-TerminalArgAppId=--class= -X-TerminalArgTitle=--title= -X-TerminalArgDir=--working-directory= - -[Desktop Action New] -Name=New Terminal -Exec=alacritty -EOF -fi diff --git a/migrations/1763561396.sh b/migrations/1763561396.sh deleted file mode 100644 index d69e51e1..00000000 --- a/migrations/1763561396.sh +++ /dev/null @@ -1,3 +0,0 @@ -echo "Switch to stable Omarchy Package Repository builds" - -omarchy-refresh-pacman diff --git a/migrations/1763583093.sh b/migrations/1763583093.sh deleted file mode 100644 index 85cd0c2f..00000000 --- a/migrations/1763583093.sh +++ /dev/null @@ -1,6 +0,0 @@ -echo "Make ethereal available as new theme" - -if [[ ! -L ~/.config/omarchy/themes/ethereal ]]; then - rm -rf ~/.config/omarchy/themes/ethereal - ln -nfs ~/.local/share/omarchy/themes/ethereal ~/.config/omarchy/themes/ -fi diff --git a/migrations/1763626772.sh b/migrations/1763626772.sh deleted file mode 100644 index aa02e9f9..00000000 --- a/migrations/1763626772.sh +++ /dev/null @@ -1,6 +0,0 @@ -echo "Make hackerman available as new theme" - -if [[ ! -L ~/.config/omarchy/themes/hackerman ]]; then - rm -rf ~/.config/omarchy/themes/hackerman - ln -nfs ~/.local/share/omarchy/themes/hackerman ~/.config/omarchy/themes/ -fi diff --git a/migrations/1763633307.sh b/migrations/1763633307.sh deleted file mode 100644 index d93893f7..00000000 --- a/migrations/1763633307.sh +++ /dev/null @@ -1,5 +0,0 @@ -echo "Add 100-line split resizing keybindings to Ghostty" - -if ! grep -q "resize_split:down,100" ~/.config/ghostty/config; then - sed -i "/keybind = control+insert=copy_to_clipboard/a\keybind = super+control+shift+alt+arrow_down=resize_split:down,100\nkeybind = super+control+shift+alt+arrow_up=resize_split:up,100\nkeybind = super+control+shift+alt+arrow_left=resize_split:left,100\nkeybind = super+control+shift+alt+arrow_right=resize_split:right,100" ~/.config/ghostty/config -fi diff --git a/migrations/1763753641.sh b/migrations/1763753641.sh deleted file mode 100644 index 40d83994..00000000 --- a/migrations/1763753641.sh +++ /dev/null @@ -1,3 +0,0 @@ -echo "Include pacman mirror and OPR upstreams (edge vs stable) in About" - -omarchy-refresh-fastfetch diff --git a/migrations/1764067963.sh b/migrations/1764067963.sh deleted file mode 100644 index 99590cbb..00000000 --- a/migrations/1764067963.sh +++ /dev/null @@ -1,4 +0,0 @@ -echo "Ensure lockout limit is reset on reboot" - -sudo sed -i '/pam_faillock\.so preauth/d' /etc/pam.d/sddm-autologin -sudo sed -i '/auth.*pam_permit\.so/a auth required pam_faillock.so authsucc' /etc/pam.d/sddm-autologin diff --git a/migrations/1764272475.sh b/migrations/1764272475.sh deleted file mode 100644 index 36a7299a..00000000 --- a/migrations/1764272475.sh +++ /dev/null @@ -1,2 +0,0 @@ -echo "Update Plymouth theme for a smoother progress bar animation" -omarchy-refresh-plymouth diff --git a/migrations/1764333665.sh b/migrations/1764333665.sh deleted file mode 100644 index e6d5fee5..00000000 --- a/migrations/1764333665.sh +++ /dev/null @@ -1,3 +0,0 @@ -echo "Ensure you have package repository indexes matching your channel" - -sudo pacman -Syyu --noconfirm diff --git a/migrations/1765587218.sh b/migrations/1765587218.sh deleted file mode 100644 index 6d58bd9e..00000000 --- a/migrations/1765587218.sh +++ /dev/null @@ -1,17 +0,0 @@ -echo "Add custom share portal picker" -omarchy-pkg-add hyprland-preview-share-picker - -mkdir -p ~/.config/hyprland-preview-share-picker -omarchy-refresh-config hyprland-preview-share-picker/config.yaml - -if ! grep -q "custom_picker_binary" ~/.config/hypr/xdph.conf; then - sed -i '/screencopy {/a\ custom_picker_binary = hyprland-preview-share-picker' ~/.config/hypr/xdph.conf -fi - -sleep 1 -killall -e xdg-desktop-portal-hyprland -killall -e xdg-desktop-portal-wlr -killall xdg-desktop-portal -/usr/lib/xdg-desktop-portal-hyprland & -sleep 2 -/usr/lib/xdg-desktop-portal & diff --git a/migrations/1765744321.sh b/migrations/1765744321.sh deleted file mode 100644 index adc32e79..00000000 --- a/migrations/1765744321.sh +++ /dev/null @@ -1,2 +0,0 @@ -echo "Increase faillock attempts to 10" -sudo sed -i 's/^# *deny = .*/deny = 10/' /etc/security/faillock.conf diff --git a/migrations/1765846739.sh b/migrations/1765846739.sh deleted file mode 100644 index 5c7634be..00000000 --- a/migrations/1765846739.sh +++ /dev/null @@ -1,3 +0,0 @@ -echo "Add missing dotnet 9.0 for Pinta" - -omarchy-pkg-add dotnet-runtime-9.0 diff --git a/migrations/1765884267.sh b/migrations/1765884267.sh deleted file mode 100644 index f418914d..00000000 --- a/migrations/1765884267.sh +++ /dev/null @@ -1,6 +0,0 @@ -echo "Change to openai-codex instead of openai-codex-bin" - -if omarchy-pkg-present openai-codex-bin; then - omarchy-pkg-drop openai-codex-bin - omarchy-pkg-add openai-codex -fi diff --git a/migrations/1766942230.sh b/migrations/1766942230.sh deleted file mode 100644 index 7e51c021..00000000 --- a/migrations/1766942230.sh +++ /dev/null @@ -1,19 +0,0 @@ -echo "Migrate legacy NVIDIA GPUs to nvidia-580xx driver (if needed)" - -# Only migrate GTX 9xx or 10xx (Pascal/Maxwell) -NVIDIA="$(lspci | grep -i 'nvidia')" -if echo "$NVIDIA" | grep -qE "GTX 9|GTX 10"; then - if ! pacman -Qq | grep -qE '^linux(-[a-z0-9]+)?-headers$'; then - echo "Error: no linux headers package installed (required for DKMS drivers). Please install the appropriate headers and re-run this migration." - exit 1 - fi - - # Piping yes to override existing packages - yes | sudo pacman -S nvidia-580xx-dkms nvidia-580xx-utils lib32-nvidia-580xx-utils - - # Verify packages were installed - if ! pacman -Qq nvidia-580xx-dkms nvidia-580xx-utils lib32-nvidia-580xx-utils &>/dev/null; then - echo "Error: NVIDIA 580xx driver packages failed to install" - exit 1 - fi -fi diff --git a/migrations/1767306902.sh b/migrations/1767306902.sh deleted file mode 100644 index 18d1b395..00000000 --- a/migrations/1767306902.sh +++ /dev/null @@ -1,65 +0,0 @@ -echo "Migrate to new theme setup" - -# Move user-added backgrounds from Omarchy theme folders to user config -OMARCHY_DIR="$HOME/.local/share/omarchy" -USER_BACKGROUNDS_DIR="$HOME/.config/omarchy/backgrounds" - -if [[ -d $OMARCHY_DIR/themes ]]; then - cd "$OMARCHY_DIR" - - # Get list of git-tracked background files (relative to omarchy dir) - mapfile -t TRACKED_BACKGROUNDS < <(git ls-files --cached 'themes/*/backgrounds/*' 2>/dev/null) - - # Find all background files and check if they're untracked (user-added) - for theme_dir in themes/*/; do - theme_name=$(basename "$theme_dir") - backgrounds_dir="themes/$theme_name/backgrounds" - - [[ -d $backgrounds_dir ]] || continue - - for bg_file in "$backgrounds_dir"/*; do - [[ -f $bg_file ]] || continue - - # Check if this file is tracked by git - is_tracked=false - for tracked in "${TRACKED_BACKGROUNDS[@]}"; do - if [[ $tracked == $bg_file ]]; then - is_tracked=true - break - fi - done - - if [[ $is_tracked == "false" ]]; then - # This is a user-added background, move it to user config - user_theme_bg_dir="$USER_BACKGROUNDS_DIR/$theme_name" - mkdir -p "$user_theme_bg_dir" - mv "$bg_file" "$user_theme_bg_dir/" - echo "Moved user background: $bg_file -> $user_theme_bg_dir/" - fi - done - done -fi - -THEMES_DIR="$HOME/.config/omarchy/themes" -CURRENT_THEME_LINK="$HOME/.config/omarchy/current/theme" - -# Get current theme name before removing anything -CURRENT_THEME_NAME="" -if [[ -L $CURRENT_THEME_LINK ]]; then - CURRENT_THEME_NAME=$(basename "$(readlink "$CURRENT_THEME_LINK")") -elif [[ -d $CURRENT_THEME_LINK ]]; then - CURRENT_THEME_NAME=$(basename "$CURRENT_THEME_LINK") -elif [[ -f $HOME/.config/omarchy/current/theme.name ]]; then - CURRENT_THEME_NAME=$(cat "$HOME/.config/omarchy/current/theme.name") -fi - -# Remove all symlinks from ~/.config/omarchy/themes -find "$THEMES_DIR" -mindepth 1 -maxdepth 1 -type l -delete - -# Re-apply the current theme with the new system -if [[ -n $CURRENT_THEME_NAME ]]; then - omarchy-theme-set "$CURRENT_THEME_NAME" -else - # Backup to ensure a theme is set if we can't deduce the name - omarchy-theme-set "Tokyo Night" -fi diff --git a/migrations/1767478687.sh b/migrations/1767478687.sh deleted file mode 100644 index 3793cb1b..00000000 --- a/migrations/1767478687.sh +++ /dev/null @@ -1,9 +0,0 @@ -echo "Add opencode with system theming" - -omarchy-pkg-add opencode - -# Add config using omarchy theme by default -if [[ ! -f ~/.config/opencode/opencode.json ]]; then - mkdir -p ~/.config/opencode - cp $OMARCHY_PATH/config/opencode/opencode.json ~/.config/opencode/opencode.json -fi diff --git a/migrations/1767865784.sh b/migrations/1767865784.sh deleted file mode 100644 index ebefa8d2..00000000 --- a/migrations/1767865784.sh +++ /dev/null @@ -1,3 +0,0 @@ -echo "Ensure Chromium is able to start on first run after ISO 3.3.0 install" - -rm -rf ~/.config/chromium/SingletonLock diff --git a/migrations/1768236764.sh b/migrations/1768236764.sh deleted file mode 100644 index 38e02bd6..00000000 --- a/migrations/1768236764.sh +++ /dev/null @@ -1,4 +0,0 @@ -echo "Prevent kernel upgrades from making current modules unavailable" - -omarchy-pkg-add kernel-modules-hook -sudo systemctl enable --now linux-modules-cleanup.service diff --git a/migrations/1768906440.sh b/migrations/1768906440.sh deleted file mode 100644 index 19c676cd..00000000 --- a/migrations/1768906440.sh +++ /dev/null @@ -1,19 +0,0 @@ -echo "Migrate legacy mobile NVIDIA GPUs to nvidia-580xx driver (if needed)" - -# Only migrate MX1xx, 2xx or 3xx (Pascal/Maxwell) -NVIDIA="$(lspci | grep -i 'nvidia')" -if echo "$NVIDIA" | grep -qE "MX1|MX2|MX3"; then - if ! pacman -Qq | grep -qE '^linux(-[a-z0-9]+)?-headers$'; then - echo "Error: no linux headers package installed (required for DKMS drivers). Please install the appropriate headers and re-run this migration." - exit 1 - fi - - # Piping yes to override existing packages - yes | sudo pacman -S nvidia-580xx-dkms nvidia-580xx-utils lib32-nvidia-580xx-utils - - # Verify packages were installed - if ! pacman -Qq nvidia-580xx-dkms nvidia-580xx-utils lib32-nvidia-580xx-utils &>/dev/null; then - echo "Error: NVIDIA 580xx driver packages failed to install" - exit 1 - fi -fi diff --git a/migrations/1768916735.sh b/migrations/1768916735.sh deleted file mode 100644 index 888076d9..00000000 --- a/migrations/1768916735.sh +++ /dev/null @@ -1,8 +0,0 @@ -echo "Fix microphone gain and audio mixing on Asus ROG laptops" - -source "$OMARCHY_PATH/install/config/hardware/asus/fix-mic.sh" -source "$OMARCHY_PATH/install/config/hardware/asus/fix-audio-mixer.sh" - -if omarchy-hw-asus-rog; then - omarchy-restart-audio -fi diff --git a/migrations/1769183359.sh b/migrations/1769183359.sh deleted file mode 100644 index dbdbedf2..00000000 --- a/migrations/1769183359.sh +++ /dev/null @@ -1,3 +0,0 @@ -echo "Add nautilus-python package for 'Open in Ghostty' shortcut in Nautilus" - -omarchy-pkg-add nautilus-python diff --git a/migrations/1769510847.sh b/migrations/1769510847.sh deleted file mode 100644 index 5ddfd508..00000000 --- a/migrations/1769510847.sh +++ /dev/null @@ -1,10 +0,0 @@ -echo "Switch back to mainline chromium now that it supports full live theming" - -if omarchy-pkg-present omarchy-chromium; then - if gum confirm "Ready to switch to mainstream chromium? (Will close Chromium + reset settings)"; then - pkill -x chromium - omarchy-pkg-drop omarchy-chromium - omarchy-pkg-add chromium - omarchy-theme-set-browser - fi -fi diff --git a/migrations/1769616857.sh b/migrations/1769616857.sh deleted file mode 100644 index 34e57bdf..00000000 --- a/migrations/1769616857.sh +++ /dev/null @@ -1,3 +0,0 @@ -echo "Turn off opencode's own auto-update feature (we rely on pacman)" - -omarchy-refresh-config opencode/opencode.json diff --git a/migrations/1769619823.sh b/migrations/1769619823.sh deleted file mode 100644 index 47f1f482..00000000 --- a/migrations/1769619823.sh +++ /dev/null @@ -1,3 +0,0 @@ -echo "Open directories in file manager using the shell open command" - -xdg-mime default org.gnome.Nautilus.desktop inode/directory diff --git a/migrations/1770393078.sh b/migrations/1770393078.sh deleted file mode 100644 index 79238051..00000000 --- a/migrations/1770393078.sh +++ /dev/null @@ -1,7 +0,0 @@ -echo "Add async-backend = epoll to ghostty config to fix high IO pressure" - -if [[ -f ~/.config/ghostty/config ]] && ! grep -q "^async-backend" ~/.config/ghostty/config; then - echo "" >> ~/.config/ghostty/config - echo "# Fix general slowness on hyprland (https://github.com/ghostty-org/ghostty/discussions/3224)" >> ~/.config/ghostty/config - echo "async-backend = epoll" >> ~/.config/ghostty/config -fi diff --git a/migrations/1770483021.sh b/migrations/1770483021.sh deleted file mode 100644 index d4576694..00000000 --- a/migrations/1770483021.sh +++ /dev/null @@ -1,4 +0,0 @@ -echo "Install Framework 16 keyboard RGB support" - -source $OMARCHY_PATH/install/packaging/framework16.sh -source $OMARCHY_PATH/install/config/hardware/framework/qmk-hid.sh diff --git a/migrations/1770638893.sh b/migrations/1770638893.sh deleted file mode 100644 index 0e5f2e54..00000000 --- a/migrations/1770638893.sh +++ /dev/null @@ -1,9 +0,0 @@ -echo "Add Tmux as an option with themed styling" - -omarchy-pkg-add tmux - -if [[ ! -f ~/.config/tmux/tmux.conf ]]; then - mkdir -p ~/.config/tmux - cp $OMARCHY_PATH/config/tmux/tmux.conf ~/.config/tmux/tmux.conf - omarchy-theme-refresh -fi diff --git a/migrations/1771002522.sh b/migrations/1771002522.sh deleted file mode 100644 index a4550bc5..00000000 --- a/migrations/1771002522.sh +++ /dev/null @@ -1,11 +0,0 @@ -echo "Add full OSC 52 support to Alacritty" - -ALACRITTY_CONFIG=~/.config/alacritty/alacritty.toml - -if [[ -f $ALACRITTY_CONFIG ]] && ! grep -q 'osc52' "$ALACRITTY_CONFIG"; then - cat >> "$ALACRITTY_CONFIG" << 'EOF' - -[terminal] -osc52 = "CopyPaste" -EOF -fi diff --git a/migrations/1771188969.sh b/migrations/1771188969.sh deleted file mode 100644 index e89716e1..00000000 --- a/migrations/1771188969.sh +++ /dev/null @@ -1,14 +0,0 @@ -echo "Remove temporary Wayland color manager disabling flag from existing Chromium configs" - -# This reverts the workaround originally added by migration 1760401344.sh -# Remove flag and comment from chromium-flags.conf only if found -if [[ -f ~/.config/chromium-flags.conf ]]; then - sed -i '/--disable-features=WaylandWpColorManagerV1/d' ~/.config/chromium-flags.conf - sed -i '/# Chromium crash workaround for Wayland color management on Hyprland/d' ~/.config/chromium-flags.conf -fi - -# Remove flag and comment from brave-flags.conf only if found -if [[ -f ~/.config/brave-flags.conf ]]; then - sed -i '/--disable-features=WaylandWpColorManagerV1/d' ~/.config/brave-flags.conf - sed -i '/# Chromium crash workaround for Wayland color management on Hyprland/d' ~/.config/brave-flags.conf -fi diff --git a/migrations/1771345870.sh b/migrations/1771345870.sh deleted file mode 100644 index 3af93cd5..00000000 --- a/migrations/1771345870.sh +++ /dev/null @@ -1,6 +0,0 @@ -echo "Switch lmstudio -> lmstudio-bin" - -if pacman -Q lmstudio &>/dev/null; then - omarchy-pkg-drop lmstudio - omarchy-pkg-add lmstudio-bin -fi diff --git a/migrations/1771403119.sh b/migrations/1771403119.sh deleted file mode 100644 index 59bd6bda..00000000 --- a/migrations/1771403119.sh +++ /dev/null @@ -1,3 +0,0 @@ -echo "Cure Chromium crash bug caused by mixing 145 and 144 sync logs" - -rm -f ~/.config/chromium/Default/"Sync Data"/LevelDB/*.log diff --git a/migrations/1771615907.sh b/migrations/1771615907.sh deleted file mode 100644 index dc21029b..00000000 --- a/migrations/1771615907.sh +++ /dev/null @@ -1,3 +0,0 @@ -echo "Add emoji font fallback to fontconfig" -cp $OMARCHY_PATH/config/fontconfig/fonts.conf ~/.config/fontconfig/fonts.conf -fc-cache -f diff --git a/migrations/1771667323.sh b/migrations/1771667323.sh deleted file mode 100644 index d93b58af..00000000 --- a/migrations/1771667323.sh +++ /dev/null @@ -1,7 +0,0 @@ -echo "Fix colored gutter in nvim by making line numbers transparent" - -TRANSPARENCY_FILE="$HOME/.config/nvim/plugin/after/transparency.lua" - -if [[ -f $TRANSPARENCY_FILE ]] && ! grep -q "LineNr" "$TRANSPARENCY_FILE"; then - sed -i '/SignColumn/a vim.api.nvim_set_hl(0, "LineNr", { bg = "none" })\nvim.api.nvim_set_hl(0, "CursorLineNr", { bg = "none" })' "$TRANSPARENCY_FILE" -fi diff --git a/migrations/1771670389.sh b/migrations/1771670389.sh deleted file mode 100644 index 1cc282a1..00000000 --- a/migrations/1771670389.sh +++ /dev/null @@ -1,7 +0,0 @@ -echo "Add Logout option to system menu" - -omarchy-refresh-sddm - -if [[ -f /etc/sddm.conf.d/autologin.conf ]]; then - sudo sed -i 's/^Current=.*/Current=omarchy/' /etc/sddm.conf.d/autologin.conf -fi diff --git a/migrations/1771682500.sh b/migrations/1771682500.sh deleted file mode 100644 index d84e987f..00000000 --- a/migrations/1771682500.sh +++ /dev/null @@ -1,12 +0,0 @@ -echo "Prevent SDDM password login from creating encrypted login keyring" - -# Rename the encrypted login keyring if it exists (it conflicts with the passwordless Default_keyring) -if [[ -f $HOME/.local/share/keyrings/login.keyring ]]; then - mv "$HOME/.local/share/keyrings/login.keyring" "$HOME/.local/share/keyrings/login.keyring.bak" -fi - -# Remove gnome-keyring auth/password lines from sddm PAM so password-based logins -# don't create an encrypted login keyring. Keep the session line to start the daemon, -# which will auto-unlock the passwordless Default_keyring. -sudo sed -i '/-auth.*pam_gnome_keyring\.so/d' /etc/pam.d/sddm -sudo sed -i '/-password.*pam_gnome_keyring\.so/d' /etc/pam.d/sddm diff --git a/migrations/1771683296.sh b/migrations/1771683296.sh deleted file mode 100644 index 5a7b9543..00000000 --- a/migrations/1771683296.sh +++ /dev/null @@ -1,13 +0,0 @@ -echo "Migrate suspend toggle from opt-in to opt-out" - -SUSPEND_ON=~/.local/state/omarchy/toggles/suspend-on -SUSPEND_OFF=~/.local/state/omarchy/toggles/suspend-off - -if [[ -f $SUSPEND_ON ]]; then - # User had suspend enabled, remove old file (suspend is now on by default) - rm -f $SUSPEND_ON -else - # User had suspend disabled, create opt-out file to preserve their choice - mkdir -p "$(dirname $SUSPEND_OFF)" - touch $SUSPEND_OFF -fi diff --git a/migrations/1772051864.sh b/migrations/1772051864.sh deleted file mode 100644 index 2d9d9861..00000000 --- a/migrations/1772051864.sh +++ /dev/null @@ -1,5 +0,0 @@ -echo "Disable Ruby compilation in mise (if mise and ruby are installed)" - -if omarchy-cmd-present mise && mise which ruby &>/dev/null; then - mise settings set ruby.compile false -fi diff --git a/migrations/1772211023.sh b/migrations/1772211023.sh deleted file mode 100644 index fe47860b..00000000 --- a/migrations/1772211023.sh +++ /dev/null @@ -1,3 +0,0 @@ -echo "Ensure password field doesn't overflow on SDDM login screen" - -omarchy-refresh-sddm diff --git a/migrations/1772294096.sh b/migrations/1772294096.sh deleted file mode 100644 index b00383dc..00000000 --- a/migrations/1772294096.sh +++ /dev/null @@ -1,21 +0,0 @@ -echo "Add Alt+Arrow keybindings for tmux window and session navigation" - -TMUX_CONF=~/.config/tmux/tmux.conf - -if [[ -f $TMUX_CONF ]]; then - # Add M-Left/M-Right after M-9 if not present - if ! grep -q "bind -n M-Left select-window" "$TMUX_CONF"; then - sed -i '/bind -n M-9 select-window -t 9/a\ -bind -n M-Left select-window -t -1\ -bind -n M-Right select-window -t +1' "$TMUX_CONF" - fi - - # Add M-Up/M-Down after "bind N switch-client -n" if not present - if ! grep -q "bind -n M-Up switch-client" "$TMUX_CONF"; then - sed -i '/^bind N switch-client -n$/a\ -bind -n M-Up switch-client -p\ -bind -n M-Down switch-client -n' "$TMUX_CONF" - fi - - omarchy-restart-tmux -fi diff --git a/migrations/1772379119.sh b/migrations/1772379119.sh deleted file mode 100644 index 12e10134..00000000 --- a/migrations/1772379119.sh +++ /dev/null @@ -1,13 +0,0 @@ -echo "Add Alt+Shift+Arrow keybindings for swapping tmux windows" - -TMUX_CONF=~/.config/tmux/tmux.conf - -if [[ -f $TMUX_CONF ]]; then - if ! grep -q "bind -n M-S-Left swap-window" "$TMUX_CONF"; then - sed -i '/bind -n M-Right select-window -t +1/a\ -bind -n M-S-Left swap-window -t -1 \\; select-window -t -1\ -bind -n M-S-Right swap-window -t +1 \\; select-window -t +1' "$TMUX_CONF" - fi - - omarchy-restart-tmux -fi diff --git a/migrations/1772389838.sh b/migrations/1772389838.sh deleted file mode 100644 index 8a98a3ea..00000000 --- a/migrations/1772389838.sh +++ /dev/null @@ -1,67 +0,0 @@ -echo "Fix nvim transparency to preserve highlight foreground colors" - -TRANSPARENCY_FILE="$HOME/.config/nvim/plugin/after/transparency.lua" - -if [[ -f "$TRANSPARENCY_FILE" ]]; then - cat > "$TRANSPARENCY_FILE" << 'EOF' --- Make highlight groups transparent while preserving their other attributes -local function make_transparent(name) - local ok, hl = pcall(vim.api.nvim_get_hl, 0, { name = name, link = false }) - if ok then - hl.bg = nil - vim.api.nvim_set_hl(0, name, hl) - end -end - -local groups = { - -- transparent background - "Normal", - "NormalFloat", - "FloatBorder", - "Pmenu", - "Terminal", - "EndOfBuffer", - "FoldColumn", - "Folded", - "SignColumn", - "LineNr", - "CursorLineNr", - "NormalNC", - "WhichKeyFloat", - "TelescopeBorder", - "TelescopeNormal", - "TelescopePromptBorder", - "TelescopePromptTitle", - -- neotree - "NeoTreeNormal", - "NeoTreeNormalNC", - "NeoTreeVertSplit", - "NeoTreeWinSeparator", - "NeoTreeEndOfBuffer", - -- nvim-tree - "NvimTreeNormal", - "NvimTreeVertSplit", - "NvimTreeEndOfBuffer", - -- notify - "NotifyINFOBody", - "NotifyERRORBody", - "NotifyWARNBody", - "NotifyTRACEBody", - "NotifyDEBUGBody", - "NotifyINFOTitle", - "NotifyERRORTitle", - "NotifyWARNTitle", - "NotifyTRACETitle", - "NotifyDEBUGTitle", - "NotifyINFOBorder", - "NotifyERRORBorder", - "NotifyWARNBorder", - "NotifyTRACEBorder", - "NotifyDEBUGBorder", -} - -for _, name in ipairs(groups) do - make_transparent(name) -end -EOF -fi diff --git a/migrations/1772632144.sh b/migrations/1772632144.sh deleted file mode 100644 index 2cfbd84c..00000000 --- a/migrations/1772632144.sh +++ /dev/null @@ -1,7 +0,0 @@ -echo "Use mise shims in ~/.config/uwsm/env" - -UWSM_ENV="$HOME/.config/uwsm/env" - -if [[ -f $UWSM_ENV ]] && grep -q 'mise activate bash)' "$UWSM_ENV"; then - sed -i 's/mise activate bash)/mise activate bash --shims)/g' "$UWSM_ENV" -fi diff --git a/migrations/1772907198.sh b/migrations/1772907198.sh deleted file mode 100644 index 82f21fe0..00000000 --- a/migrations/1772907198.sh +++ /dev/null @@ -1,11 +0,0 @@ -echo "Add automatic-rename settings to tmux configuration" - -if [[ -f ~/.config/tmux/tmux.conf ]]; then - if ! grep -q "set -gw automatic-rename on" ~/.config/tmux/tmux.conf; then - sed -i '/set -g window-status-separator ""/a\ -set -gw automatic-rename on\ -set -gw automatic-rename-format '\''#{b:pane_current_path}'\''\ -' ~/.config/tmux/tmux.conf - omarchy-restart-tmux - fi -fi diff --git a/migrations/1772964511.sh b/migrations/1772964511.sh deleted file mode 100644 index 0de1dedb..00000000 --- a/migrations/1772964511.sh +++ /dev/null @@ -1,3 +0,0 @@ -echo "Only run plocate indexing on AC power to prevent hangs after sleep" - -source $OMARCHY_PATH/install/config/plocate-ac-only.sh diff --git a/migrations/1772981555.sh b/migrations/1772981555.sh deleted file mode 100644 index d843150f..00000000 --- a/migrations/1772981555.sh +++ /dev/null @@ -1,7 +0,0 @@ -echo "Update hyprland-preview-share-picker config to default to outputs page" - -CONFIG_FILE=~/.config/hyprland-preview-share-picker/config.yaml - -if [[ -f $CONFIG_FILE ]]; then - sed -i 's/^default_page: windows$/default_page: outputs/' "$CONFIG_FILE" -fi diff --git a/migrations/1772981757.sh b/migrations/1772981757.sh deleted file mode 100644 index e19c9301..00000000 --- a/migrations/1772981757.sh +++ /dev/null @@ -1,5 +0,0 @@ -echo "Install Intel GPU hardware acceleration drivers if missing" - -if lspci | grep -iE 'vga|3d|display' | grep -qi 'intel'; then - source "$OMARCHY_PATH/install/config/hardware/intel/video-acceleration.sh" -fi diff --git a/migrations/1772988614.sh b/migrations/1772988614.sh deleted file mode 100644 index 87b9726b..00000000 --- a/migrations/1772988614.sh +++ /dev/null @@ -1,7 +0,0 @@ -echo "Add Shift+Return keyboard binding for multi-line as used by Claude Code to Alacritty" - -ALACRITTY_CONFIG=~/.config/alacritty/alacritty.toml - -if [[ -f $ALACRITTY_CONFIG ]] && ! grep -q 'key = "Return"' "$ALACRITTY_CONFIG"; then - sed -i 's/{ key = "Insert", mods = "Control", action = "Copy" }/{ key = "Insert", mods = "Control", action = "Copy" },\n { key = "Return", mods = "Shift", chars = "\\u001B\\r" }/' "$ALACRITTY_CONFIG" -fi diff --git a/migrations/1772990935.sh b/migrations/1772990935.sh deleted file mode 100644 index 2b58912d..00000000 --- a/migrations/1772990935.sh +++ /dev/null @@ -1,7 +0,0 @@ -echo "Add sample low battery notification hook" - -mkdir -p ~/.config/omarchy/hooks/battery-low.d - -if [[ ! -f ~/.config/omarchy/hooks/battery-low.d/play-warning-sound.sample ]]; then - cp "$OMARCHY_PATH/config/omarchy/hooks/battery-low.d/play-warning-sound.sample" ~/.config/omarchy/hooks/battery-low.d/play-warning-sound.sample -fi diff --git a/migrations/1773012889.sh b/migrations/1773012889.sh deleted file mode 100644 index d8dd1619..00000000 --- a/migrations/1773012889.sh +++ /dev/null @@ -1,4 +0,0 @@ -echo "Install system-sleep hook to unmount gvfsd-fuse before suspend/hibernate" - -sudo mkdir -p /usr/lib/systemd/system-sleep -sudo install -m 0755 -o root -g root "$OMARCHY_PATH/default/systemd/system-sleep/unmount-fuse" /usr/lib/systemd/system-sleep/ diff --git a/migrations/1773505447.sh b/migrations/1773505447.sh deleted file mode 100644 index 02c75c67..00000000 --- a/migrations/1773505447.sh +++ /dev/null @@ -1,3 +0,0 @@ -echo "Enable thermald for Intel Sandy Bridge and newer laptops" - -source "$OMARCHY_PATH/install/config/hardware/intel/thermald.sh" diff --git a/migrations/1773506226.sh b/migrations/1773506226.sh deleted file mode 100644 index 6a56f863..00000000 --- a/migrations/1773506226.sh +++ /dev/null @@ -1,15 +0,0 @@ -echo "Enable GPU in voxtype if Vulkan is available" - -if omarchy-cmd-present voxtype; then - if omarchy-hw-vulkan; then - echo "Vulkan is available, enabling GPU in voxtype" - voxtype setup gpu --enable || true - fi - - # see https://github.com/peteonrails/voxtype/commit/ce6e9919cbe54cb8808dcb3cdd3bcb3260d7b900 - # earlier versions of voxtype hard-coded the non-GPU backend in the systemd service file, - # so we need to re-run setup to update it to use /usr/bin/voxtype (the symlink) - voxtype setup systemd - - systemctl --user restart voxtype -fi diff --git a/migrations/1773599943.sh b/migrations/1773599943.sh deleted file mode 100644 index cd060bd6..00000000 --- a/migrations/1773599943.sh +++ /dev/null @@ -1,8 +0,0 @@ -echo "Add COPY mode indicator to tmux status bar" - -if [[ -f ~/.config/tmux/tmux.conf ]]; then - if ! grep -q "pane_in_mode" ~/.config/tmux/tmux.conf; then - sed -i 's/#{?client_prefix/#{?pane_in_mode,COPY ,}#{?client_prefix/' ~/.config/tmux/tmux.conf - omarchy-restart-tmux - fi -fi diff --git a/migrations/1774366575.sh b/migrations/1774366575.sh deleted file mode 100644 index e3ea5551..00000000 --- a/migrations/1774366575.sh +++ /dev/null @@ -1,3 +0,0 @@ -echo "Install Intel Low Power Mode for Intel CPUs" - -source "$OMARCHY_PATH/install/config/hardware/intel/lpmd.sh" diff --git a/migrations/1774401148.sh b/migrations/1774401148.sh deleted file mode 100644 index cda4c3eb..00000000 --- a/migrations/1774401148.sh +++ /dev/null @@ -1,6 +0,0 @@ -echo "Fix KERNEL_CMDLINE merge behavior in /etc/default/limine" - -if [[ -f /etc/default/limine ]]; then - sudo sed -i 's/^KERNEL_CMDLINE\[default\]="/KERNEL_CMDLINE[default]+="/' /etc/default/limine - sudo limine-mkinitcpio -fi diff --git a/migrations/1774642699.sh b/migrations/1774642699.sh deleted file mode 100644 index b8fbc834..00000000 --- a/migrations/1774642699.sh +++ /dev/null @@ -1,7 +0,0 @@ -echo "Load Bluetooth driver module on T2 Macs" - -if lspci -nn | grep -q "106b:180[12]"; then - if ! grep -q "hci_bcm4377" /etc/modules-load.d/t2.conf 2>/dev/null; then - echo "hci_bcm4377" | sudo tee -a /etc/modules-load.d/t2.conf >/dev/null - fi -fi diff --git a/migrations/1775059710.sh b/migrations/1775059710.sh deleted file mode 100644 index c385a8ea..00000000 --- a/migrations/1775059710.sh +++ /dev/null @@ -1,11 +0,0 @@ -echo "Install tuned fan curve for T2 MacBook" - -if lspci -nn | grep -q "106b:180[12]" && [[ ! -f /etc/t2fand.conf ]]; then - cat </dev/null -[Fan1] -low_temp=55 -high_temp=75 -speed_curve=linear -always_full_speed=false -EOF -fi diff --git a/migrations/1775241210.sh b/migrations/1775241210.sh deleted file mode 100644 index 520a8a5e..00000000 --- a/migrations/1775241210.sh +++ /dev/null @@ -1,15 +0,0 @@ -echo "Enable GPU in voxtype if Vulkan is available" - -if omarchy-cmd-present voxtype; then - if omarchy-hw-vulkan; then - echo "Vulkan is available, enabling GPU in voxtype" - sudo voxtype setup gpu --enable || true - fi - - # see https://github.com/peteonrails/voxtype/commit/ce6e9919cbe54cb8808dcb3cdd3bcb3260d7b900 - # earlier versions of voxtype hard-coded the non-GPU backend in the systemd service file, - # so we need to re-run setup to update it to use /usr/bin/voxtype (the symlink) - voxtype setup systemd - - systemctl --user restart voxtype -fi diff --git a/migrations/1775546086.sh b/migrations/1775546086.sh deleted file mode 100644 index 403705ae..00000000 --- a/migrations/1775546086.sh +++ /dev/null @@ -1,5 +0,0 @@ -echo "Enable Intel LPMD service if installed" - -if pacman -Q intel-lpmd &>/dev/null; then - sudo systemctl enable --now intel_lpmd.service -fi diff --git a/migrations/1775691486.sh b/migrations/1775691486.sh deleted file mode 100644 index e6fdf909..00000000 --- a/migrations/1775691486.sh +++ /dev/null @@ -1,6 +0,0 @@ -echo "Copy Fcitx5 autostart desktop file to ~/.config/autostart" - -mkdir -p ~/.config/autostart/ -cp "$OMARCHY_PATH/config/autostart/org.fcitx.Fcitx5.desktop" ~/.config/autostart/ - -omarchy-restart-xcompose diff --git a/migrations/1775954402.sh b/migrations/1775954402.sh deleted file mode 100644 index 61101d5c..00000000 --- a/migrations/1775954402.sh +++ /dev/null @@ -1,11 +0,0 @@ -echo "Remove makima key remapping service (Copilot key now handled natively by Hyprland)" - -if systemctl is-enabled makima &>/dev/null; then - sudo systemctl disable --now makima -fi - -sudo rm -rf /etc/systemd/system/makima.service.d -sudo rm -f /etc/udev/rules.d/99-uinput.rules -rm -rf "$HOME/.config/makima" - -omarchy-pkg-drop makima-bin diff --git a/migrations/1776246235.sh b/migrations/1776246235.sh deleted file mode 100644 index a58be056..00000000 --- a/migrations/1776246235.sh +++ /dev/null @@ -1,17 +0,0 @@ -echo "Fix empty resume_offset in hibernation config" - -RESUME_DROP_IN="/etc/limine-entry-tool.d/resume.conf" -SWAP_FILE="/swap/swapfile" - -if [[ -f $RESUME_DROP_IN ]] && grep -q 'resume_offset="$' "$RESUME_DROP_IN" && [[ -f $SWAP_FILE ]]; then - RESUME_OFFSET=$(sudo btrfs inspect-internal map-swapfile -r "$SWAP_FILE" 2>/dev/null) - if [[ -n $RESUME_OFFSET ]]; then - sudo sed -i "s/resume_offset=\"$/resume_offset=$RESUME_OFFSET\"/" "$RESUME_DROP_IN" - sudo sed -i "s/resume_offset=\"$/resume_offset=$RESUME_OFFSET\"/" /etc/default/limine - sudo limine-mkinitcpio - sudo limine-update - echo "Fixed: resume_offset=$RESUME_OFFSET" - else - echo "Warning: Could not determine resume offset for $SWAP_FILE" - fi -fi diff --git a/migrations/1776346552.sh b/migrations/1776346552.sh deleted file mode 100644 index ea247d7b..00000000 --- a/migrations/1776346552.sh +++ /dev/null @@ -1,12 +0,0 @@ -echo "Enable Bluetooth A2DP auto-connect in WirePlumber" - -destination=~/.config/wireplumber/wireplumber.conf.d/bluetooth-a2dp-autoconnect.conf - -mkdir -p ~/.config/wireplumber/wireplumber.conf.d/ - -if [[ ! -f "$destination" ]]; then - cp "$OMARCHY_PATH/default/wireplumber/wireplumber.conf.d/bluetooth-a2dp-autoconnect.conf" \ - "$destination" -fi - -omarchy-state set reboot-required diff --git a/migrations/1776434586.sh b/migrations/1776434586.sh deleted file mode 100644 index 4ada1b4f..00000000 --- a/migrations/1776434586.sh +++ /dev/null @@ -1,22 +0,0 @@ -echo "Move Obsidian flags from Hyprland binding to Obsidian user flags" - -OBSIDIAN_FLAGS_FILE="$HOME/.config/obsidian/user-flags.conf" -OBSIDIAN_DEFAULT_FLAGS_FILE="$OMARCHY_PATH/config/obsidian/user-flags.conf" - -mkdir -p "$(dirname "$OBSIDIAN_FLAGS_FILE")" - -if [[ ! -f $OBSIDIAN_FLAGS_FILE ]]; then - cp "$OBSIDIAN_DEFAULT_FLAGS_FILE" "$OBSIDIAN_FLAGS_FILE" -else - missing_flags=$(grep -vE '^(#|$)' "$OBSIDIAN_DEFAULT_FLAGS_FILE" | grep -vxFf "$OBSIDIAN_FLAGS_FILE" || true) - - if [[ -n $missing_flags ]]; then - { - echo - echo "# Added by Omarchy migration 1776434586: Obsidian launch flags moved from Hyprland binding." - printf "%s\n" "$missing_flags" - } >>"$OBSIDIAN_FLAGS_FILE" - fi -fi - - diff --git a/migrations/1776611242.sh b/migrations/1776611242.sh deleted file mode 100644 index aa7e42bf..00000000 --- a/migrations/1776611242.sh +++ /dev/null @@ -1,4 +0,0 @@ -echo "Install socat so we can reactivate internal display when external display is removed" - -omarchy-pkg-add socat -uwsm-app -- omarchy-hyprland-monitor-watch & diff --git a/migrations/1776615976.sh b/migrations/1776615976.sh deleted file mode 100644 index 32bebb60..00000000 --- a/migrations/1776615976.sh +++ /dev/null @@ -1,3 +0,0 @@ -echo "Install missing Intel VPL drivers (libvpl, vpl-gpu-rt) on systems with Intel GPUs" - -bash "$OMARCHY_PATH/install/config/hardware/intel/video-acceleration.sh" diff --git a/migrations/1776617403.sh b/migrations/1776617403.sh deleted file mode 100644 index 236d02ec..00000000 --- a/migrations/1776617403.sh +++ /dev/null @@ -1,14 +0,0 @@ -echo "Enable pause_media in voxtype config" - -VOXTYPE_CONF=~/.config/voxtype/config.toml - -if [[ -f $VOXTYPE_CONF ]] && ! grep -q 'pause_media' "$VOXTYPE_CONF"; then - if grep -q '^\[audio\]' "$VOXTYPE_CONF"; then - sed -i '/^\[audio\]/a\ -\ -# Pause MPRIS media players during recording\ -pause_media = true' "$VOXTYPE_CONF" - else - printf '\n[audio]\n# Pause MPRIS media players during recording\npause_media = true\n' >> "$VOXTYPE_CONF" - fi -fi diff --git a/migrations/1776781956.sh b/migrations/1776781956.sh deleted file mode 100644 index 4c9e7406..00000000 --- a/migrations/1776781956.sh +++ /dev/null @@ -1,19 +0,0 @@ -echo "Dell XPS Panther Lake display kernel cmdline is no longer necessary" - -DROP_IN="/etc/limine-entry-tool.d/dell-xps-ptl-display.conf" -DEFAULT_LIMINE="/etc/default/limine" -NEEDS_UPDATE=0 - -if [[ -f $DROP_IN ]]; then - sudo rm -f "$DROP_IN" - NEEDS_UPDATE=1 -fi - -if [[ -f $DEFAULT_LIMINE ]] && grep -q 'xe\.enable_psr' "$DEFAULT_LIMINE"; then - sudo sed -i -E '/^KERNEL_CMDLINE.*xe\.enable_psr/d; /^# .*(Dell XPS|Xe PSR|Panel Replay)/d' "$DEFAULT_LIMINE" - NEEDS_UPDATE=1 -fi - -if (( NEEDS_UPDATE )); then - sudo limine-update -fi diff --git a/migrations/1776784497.sh b/migrations/1776784497.sh deleted file mode 100644 index ef03e32d..00000000 --- a/migrations/1776784497.sh +++ /dev/null @@ -1,5 +0,0 @@ -echo "Remove resume boost feature" - -if [[ -f /usr/lib/systemd/system-sleep/resume-boost ]]; then - sudo rm /usr/lib/systemd/system-sleep/resume-boost -fi diff --git a/migrations/1776927490.sh b/migrations/1776927490.sh deleted file mode 100644 index d2c743d9..00000000 --- a/migrations/1776927490.sh +++ /dev/null @@ -1,50 +0,0 @@ -echo "Drop /home snapshots, btrfs quotas, and timeline snapshots (keep 5 root snapshots, never more)" - -if ! omarchy-cmd-present snapper btrfs; then - exit 0 -fi - -# Disable btrfs quotas first — every subvolume delete below would otherwise update -# all qgroups, which is exactly the performance drag we're removing. -sudo btrfs quota disable / 2>/dev/null || true - -# Remove the home config, all its snapshots, and the .snapshots subvolume. -# If the snapshots look like someone's been using them manually (pre/post pairs, -# userdata tags, freeform descriptions), ask before destroying. -if sudo snapper list-configs 2>/dev/null | grep -q "home"; then - drop_home="yes" - - if sudo snapper -c home --csvout list 2>/dev/null | \ - awk -F, 'NR>1 && ($6=="pre" || $6=="post" || $13!="" || ($12!="current" && $12!="timeline" && $12 !~ /^[0-9]+\.[0-9]+\.[0-9]+/))' | \ - grep -q .; then - gum confirm "Drop unused /home snapshots for better performance?" || drop_home="no" - fi - - if [[ $drop_home == "yes" ]]; then - sudo snapper -c home list --columns number 2>/dev/null | awk 'NR>2 && $1 != "0" {print $1}' | \ - xargs -r sudo snapper -c home delete 2>/dev/null - sudo snapper -c home delete-config 2>/dev/null - - if [[ -d /home/.snapshots ]]; then - for snap in /home/.snapshots/*/snapshot; do - [[ -d $snap ]] && sudo btrfs subvolume delete "$snap" 2>/dev/null - done - sudo rm -rf /home/.snapshots/* 2>/dev/null - sudo btrfs subvolume delete /home/.snapshots 2>/dev/null - fi - fi -fi - -# Ensure root config exists and matches our shipped defaults -if ! sudo snapper list-configs 2>/dev/null | grep -q "root"; then - sudo snapper -c root create-config / -fi -sudo cp $OMARCHY_PATH/default/snapper/root /etc/snapper/configs/root - -# Delete all timeline snapshots — we only want pre-update (cleanup=number) snapshots -sudo snapper -c root list --columns number,cleanup 2>/dev/null | \ - awk '$3 == "timeline" {print $1}' | \ - xargs -r sudo snapper -c root delete 2>/dev/null - -# Enforce NUMBER_LIMIT=5 on any existing number snapshots beyond the new cap -sudo snapper -c root cleanup number 2>/dev/null diff --git a/migrations/1776935686.sh b/migrations/1776935686.sh deleted file mode 100644 index 303db7b8..00000000 --- a/migrations/1776935686.sh +++ /dev/null @@ -1,9 +0,0 @@ -echo "Recover the internal monitor at login when no external display is connected" - -SERVICE=omarchy-recover-internal-monitor.service - -mkdir -p ~/.config/systemd/user -cp $OMARCHY_PATH/config/systemd/user/$SERVICE ~/.config/systemd/user/$SERVICE - -systemctl --user daemon-reload -systemctl --user enable $SERVICE diff --git a/migrations/1777018408.sh b/migrations/1777018408.sh deleted file mode 100644 index af644b53..00000000 --- a/migrations/1777018408.sh +++ /dev/null @@ -1,9 +0,0 @@ -echo "Fix Chromium appearance mode to also set color_scheme2 (the field Chromium actually reads now)" - -echo '{"browser":{"theme":{"color_scheme":0,"color_scheme2":0}}}' | sudo tee /usr/lib/chromium/initial_preferences >/dev/null - -# Update existing Chromium profiles so color_scheme2 follows the system, not dark -PREFS="$HOME/.config/chromium/Default/Preferences" -if [[ -f "$PREFS" ]] && command -v jq &>/dev/null; then - jq '.browser.theme.color_scheme = 0 | .browser.theme.color_scheme2 = 0' "$PREFS" > "$PREFS.tmp" && mv "$PREFS.tmp" "$PREFS" -fi diff --git a/migrations/1777072987.sh b/migrations/1777072987.sh deleted file mode 100644 index e2d6080c..00000000 --- a/migrations/1777072987.sh +++ /dev/null @@ -1,7 +0,0 @@ -echo "Fix disable-while-typing on ASUS ROG Flow Z13 detachable keyboard" - -source $OMARCHY_PATH/install/config/hardware/asus/fix-z13-touchpad.sh - -if [[ -f /etc/udev/rules.d/99-omarchy-asus-z13-touchpad.rules ]]; then - omarchy-state set reboot-required -fi diff --git a/migrations/1777145626.sh b/migrations/1777145626.sh deleted file mode 100644 index b6518b5d..00000000 --- a/migrations/1777145626.sh +++ /dev/null @@ -1,3 +0,0 @@ -echo "Install dosfstools for FAT filesystem utilities like fsck.fat and mkfs.fat" - -omarchy-pkg-add dosfstools diff --git a/migrations/1777282771.sh b/migrations/1777282771.sh deleted file mode 100644 index b350376f..00000000 --- a/migrations/1777282771.sh +++ /dev/null @@ -1,5 +0,0 @@ -echo "Allow Docker DNS from Docker's 192.168 address pool" - -if omarchy-cmd-present ufw && sudo ufw status | grep -q "Status: active"; then - sudo ufw allow in proto udp from 192.168.0.0/16 to 172.17.0.1 port 53 comment 'allow-docker-dns' -fi diff --git a/migrations/1777396666.sh b/migrations/1777396666.sh deleted file mode 100644 index ea8e4326..00000000 --- a/migrations/1777396666.sh +++ /dev/null @@ -1,8 +0,0 @@ -echo "Use Omarchy UWSM session without graphical.target startup wait" - -sudo mkdir -p /usr/local/share/wayland-sessions -sudo cp "$OMARCHY_PATH/default/wayland-sessions/omarchy.desktop" /usr/local/share/wayland-sessions/omarchy.desktop - -if [[ -f /etc/sddm.conf.d/autologin.conf ]]; then - sudo sed -i 's/^Session=hyprland-uwsm$/Session=omarchy/' /etc/sddm.conf.d/autologin.conf -fi diff --git a/migrations/1777450869.sh b/migrations/1777450869.sh deleted file mode 100644 index 6b1fcc8c..00000000 --- a/migrations/1777450869.sh +++ /dev/null @@ -1,9 +0,0 @@ -echo "Hide shutdown console messages behind Plymouth" - -if [[ -f /etc/default/limine ]]; then - sudo sed -i 's/ quiet splash/ quiet splash loglevel=0 systemd.show_status=false rd.udev.log_level=0 vt.global_cursor_default=0/' /etc/default/limine - - if omarchy-cmd-present limine-mkinitcpio; then - sudo limine-mkinitcpio - fi -fi diff --git a/migrations/1777546300.sh b/migrations/1777546300.sh deleted file mode 100644 index fc40e222..00000000 --- a/migrations/1777546300.sh +++ /dev/null @@ -1,9 +0,0 @@ -echo "Enable FRED on Intel Panther Lake systems" - -DEFAULT_LIMINE="/etc/default/limine" - -if omarchy-hw-intel-ptl && [[ -f $DEFAULT_LIMINE ]] && ! grep -q 'fred=on' "$DEFAULT_LIMINE"; then - source "$OMARCHY_PATH/install/config/hardware/intel/fred.sh" - - sudo limine-update -fi diff --git a/migrations/1777570652.sh b/migrations/1777570652.sh deleted file mode 100644 index 5511fe27..00000000 --- a/migrations/1777570652.sh +++ /dev/null @@ -1,10 +0,0 @@ -echo "Update interface_ colors for limine 12 (palette index -> RRGGBB)" - -if [[ -f /boot/limine.conf ]]; then - sudo sed -i -E 's/^interface_branding_colou?r: 2$/interface_branding_color: 9ece6a/' /boot/limine.conf - sudo sed -i 's/^interface_branding_colour: /interface_branding_color: /' /boot/limine.conf - - sudo sed -i -E '/^interface_help_colou?r(_bright)?:/d' /boot/limine.conf - sudo sed -i '/^interface_branding_color:/a interface_help_color_bright: 9ece6a' /boot/limine.conf - sudo sed -i '/^interface_branding_color:/a interface_help_color: 9ece6a' /boot/limine.conf -fi diff --git a/migrations/1777572869.sh b/migrations/1777572869.sh deleted file mode 100644 index b8ffd217..00000000 --- a/migrations/1777572869.sh +++ /dev/null @@ -1,16 +0,0 @@ -echo "Restore stock kernel on non-XPS Panther Lake systems" - -if omarchy-hw-intel-ptl && ! omarchy-hw-match "XPS"; then - omarchy-pkg-add linux linux-headers - - for pkg in linux-ptl linux-ptl-headers; do - sudo pacman -Rdd --noconfirm "$pkg" 2>/dev/null || true - done - - sudo rm -f /etc/limine-entry-tool.d/intel-panther-lake.conf - sudo rm -f /etc/limine-entry-tool.d/dell-xps-panther-lake.conf - - if omarchy-cmd-present limine-update; then - sudo limine-update - fi -fi diff --git a/migrations/1777618046.sh b/migrations/1777618046.sh deleted file mode 100644 index 6c5c8f10..00000000 --- a/migrations/1777618046.sh +++ /dev/null @@ -1,5 +0,0 @@ -echo "Symlink Brave Origin Beta flags to brave-flags.conf so both browsers share configuration" - -if [[ ! -e ~/.config/brave-origin-beta-flags.conf ]]; then - ln -s brave-flags.conf ~/.config/brave-origin-beta-flags.conf -fi diff --git a/migrations/1777653181.sh b/migrations/1777653181.sh deleted file mode 100644 index e79c782b..00000000 --- a/migrations/1777653181.sh +++ /dev/null @@ -1,14 +0,0 @@ -echo "Move Dell XPS touchpad haptics into the packaged service" - -if omarchy-hw-dell-xps-haptic-touchpad; then - sudo systemctl disable --now dell-xps-haptic-touchpad.service 2>/dev/null || true - sudo rm -f /etc/systemd/system/dell-xps-haptic-touchpad.service - sudo rm -f /etc/systemd/system/multi-user.target.wants/dell-xps-haptic-touchpad.service - sudo rm -rf /etc/systemd/system/dell-xps-haptic-touchpad.service.d - sudo rm -f /etc/udev/rules.d/99-dell-xps-haptic-touchpad.rules - sudo rm -f /etc/omarchy-dell-haptic-touchpad.env - sudo systemctl daemon-reload - sudo udevadm control --reload-rules - - source "$OMARCHY_PATH/install/packaging/dell-xps-touchpad-haptics.sh" -fi diff --git a/migrations/1777800806.sh b/migrations/1777800806.sh deleted file mode 100644 index a57a0ae0..00000000 --- a/migrations/1777800806.sh +++ /dev/null @@ -1,20 +0,0 @@ -echo "Enable VAAPI hardware video decoding/encoding in Chromium and Brave for h265 and other codecs" - -add_flag() { - local file=$1 - local flag=$2 - - [[ -f $file ]] || return - grep -q "$flag" "$file" && return - - if grep -q "^--enable-features=" "$file"; then - sed -i "s/^--enable-features=\(.*\)$/--enable-features=\1,$flag/" "$file" - else - echo "--enable-features=$flag" >>"$file" - fi -} - -for conf in chromium-flags.conf brave-flags.conf; do - add_flag "$HOME/.config/$conf" "VaapiVideoDecodeLinuxGL" - add_flag "$HOME/.config/$conf" "VaapiVideoEncoder" -done diff --git a/migrations/1777909712.sh b/migrations/1777909712.sh deleted file mode 100644 index 60c738a1..00000000 --- a/migrations/1777909712.sh +++ /dev/null @@ -1,10 +0,0 @@ -echo "Remove stale Xe Panel Replay kernel cmdline from Dell XPS Panther Lake systems" - -DEFAULT_LIMINE="/etc/default/limine" - -if omarchy-hw-match "XPS" && omarchy-hw-intel-ptl; then - if [[ -f $DEFAULT_LIMINE ]] && grep -q 'xe\.enable_panel_replay' "$DEFAULT_LIMINE"; then - sudo sed -i '/^KERNEL_CMDLINE.*xe\.enable_panel_replay/d' "$DEFAULT_LIMINE" - sudo limine-update - fi -fi diff --git a/migrations/1777929468.sh b/migrations/1777929468.sh deleted file mode 100644 index 9f1afa87..00000000 --- a/migrations/1777929468.sh +++ /dev/null @@ -1,5 +0,0 @@ -echo "Enable middle-click primary paste for GTK/Chromium-family apps (Ghostty, Brave, Chromium)" - -if command -v gsettings >/dev/null; then - gsettings set org.gnome.desktop.interface gtk-enable-primary-paste true || true -fi diff --git a/migrations/1777938402.sh b/migrations/1777938402.sh deleted file mode 100644 index 24099ee5..00000000 --- a/migrations/1777938402.sh +++ /dev/null @@ -1,15 +0,0 @@ -echo "Fix display backlight on supported ASUS Panther Lake laptops" - -EXPERTBOOK_DROP_IN="/etc/limine-entry-tool.d/asus-expertbook-b9406-display.conf" - -if omarchy-hw-asus-expertbook-b9406 || omarchy-hw-asus-zenbook-ux5406aa; then - if [[ -f $EXPERTBOOK_DROP_IN ]]; then - sudo sed -i '/xe\.enable_dpcd_backlight/d' "$EXPERTBOOK_DROP_IN" - fi - - source "$OMARCHY_PATH/install/config/hardware/asus/fix-asus-ptl-display-backlight.sh" - - if omarchy-cmd-present limine-update; then - sudo limine-update - fi -fi diff --git a/migrations/1778001804.sh b/migrations/1778001804.sh deleted file mode 100644 index 38413d36..00000000 --- a/migrations/1778001804.sh +++ /dev/null @@ -1,3 +0,0 @@ -echo "Fix bass speakers on Lenovo Yoga Pro 7 14IAH10" - -source "$OMARCHY_PATH/install/config/hardware/lenovo/fix-yoga-pro7-bass-speakers.sh" diff --git a/migrations/1778026496.sh b/migrations/1778026496.sh deleted file mode 100644 index d9d7b893..00000000 --- a/migrations/1778026496.sh +++ /dev/null @@ -1,11 +0,0 @@ -echo "Install sof-firmware on Intel Panther Lake to restore DSP audio" - -# linux-ptl hard-depped sof-firmware, mainline linux only optdeps it, so the -# orphan sweep after migration 1777572869 removed it. Force explicit so a -# subsequent orphan sweep in the same update cycle cannot take it again. - -if omarchy-hw-intel-ptl && ! omarchy-hw-match "XPS"; then - omarchy-pkg-add sof-firmware - sudo pacman -D --asexplicit sof-firmware >/dev/null - omarchy-state set reboot-required -fi diff --git a/migrations/1778052575.sh b/migrations/1778052575.sh deleted file mode 100644 index fc6a46cf..00000000 --- a/migrations/1778052575.sh +++ /dev/null @@ -1,7 +0,0 @@ -echo "Enable extended keyboard support in tmux" - -tmux_config="$HOME/.config/tmux/tmux.conf" - -if [[ -f $tmux_config ]] && ! grep -qxF "set -g extended-keys on" "$tmux_config"; then - sed -i '/^set -g detach-on-destroy off$/a set -g extended-keys on\nset -g extended-keys-format csi-u\nset -sg escape-time 10' "$tmux_config" -fi diff --git a/migrations/1778079164.sh b/migrations/1778079164.sh deleted file mode 100644 index 6e8fa632..00000000 --- a/migrations/1778079164.sh +++ /dev/null @@ -1,7 +0,0 @@ -echo "Update Pi CLI wrapper package" - -pi_bin="$HOME/.local/bin/pi" - -if [[ -f $pi_bin ]] && grep -q '^package="@mariozechner/pi-coding-agent"$' "$pi_bin"; then - sed -i 's|^package="@mariozechner/pi-coding-agent"$|package="@earendil-works/pi-coding-agent"|' "$pi_bin" -fi diff --git a/migrations/1778099894.sh b/migrations/1778099894.sh deleted file mode 100644 index 7a7fec9d..00000000 --- a/migrations/1778099894.sh +++ /dev/null @@ -1,3 +0,0 @@ -echo "Add Transcode entry to Nautilus context menu" - -source "$OMARCHY_PATH/install/config/nautilus-python.sh" diff --git a/migrations/1778148645.sh b/migrations/1778148645.sh deleted file mode 100644 index 40f10c03..00000000 --- a/migrations/1778148645.sh +++ /dev/null @@ -1,12 +0,0 @@ -echo "Configure SDDM to use Wayland for the greeter" - -sudo cp "$OMARCHY_PATH/default/sddm/hyprland.lua" /usr/share/sddm/hyprland.lua -sudo rm -f /usr/share/sddm/hyprland.conf -sudo mkdir -p /etc/sddm.conf.d -cat </dev/null -[General] -DisplayServer=wayland - -[Wayland] -CompositorCommand=start-hyprland -- --config /usr/share/sddm/hyprland.lua -EOF diff --git a/migrations/1778165347.sh b/migrations/1778165347.sh deleted file mode 100644 index cbd35fec..00000000 --- a/migrations/1778165347.sh +++ /dev/null @@ -1,5 +0,0 @@ -echo "Install hardware video acceleration for Intel GPUs on non-X Panther Lake systems" - -if lspci | grep -iE 'vga|3d|display' | grep -i 'intel' | grep -i 'panther lake' | grep -qi 'intel graphics'; then - bash "$OMARCHY_PATH/install/config/hardware/intel/video-acceleration.sh" -fi diff --git a/migrations/1778222128.sh b/migrations/1778222128.sh deleted file mode 100644 index d348b389..00000000 --- a/migrations/1778222128.sh +++ /dev/null @@ -1,7 +0,0 @@ -echo "Add sample post-boot hook" - -mkdir -p ~/.config/omarchy/hooks/post-boot.d - -if [[ ! -f ~/.config/omarchy/hooks/post-boot.d/weather.sample ]]; then - cp "$OMARCHY_PATH/config/omarchy/hooks/post-boot.d/weather.sample" ~/.config/omarchy/hooks/post-boot.d/weather.sample -fi diff --git a/migrations/1778233760.sh b/migrations/1778233760.sh deleted file mode 100644 index 522f14ab..00000000 --- a/migrations/1778233760.sh +++ /dev/null @@ -1,3 +0,0 @@ -echo "Add Omarchy AI skill to pi, Codex, and shared Agent Skills directories" - -source "$OMARCHY_PATH/install/config/omarchy-ai-skill.sh" diff --git a/migrations/1778270869.sh b/migrations/1778270869.sh deleted file mode 100644 index 1429d454..00000000 --- a/migrations/1778270869.sh +++ /dev/null @@ -1,20 +0,0 @@ -echo "Remove VAAPI GL video feature flags from Chromium-based browser configs to prevent crashing on some machines" - -remove_chromium_vaapi_features() { - local file=$1 - - [[ -f $file ]] || return 0 - - sed -i --follow-symlinks \ - -e '/^--enable-features=/ s/VaapiVideoDecodeLinuxGL//g' \ - -e '/^--enable-features=/ s/VaapiVideoEncoder//g' \ - -e '/^--enable-features=/ s/,,*/,/g' \ - -e '/^--enable-features=/ s/=,/=/' \ - -e '/^--enable-features=/ s/,$//' \ - -e '/^--enable-features=$/d' \ - "$file" -} - -for flags_file in "$HOME"/.config/{chromium,chrome,google-chrome,google-chrome-beta,google-chrome-unstable,brave,brave-beta,brave-nightly,brave-origin-beta,microsoft-edge-stable,microsoft-edge-beta,microsoft-edge-dev,vivaldi-stable,vivaldi-snapshot,opera,opera-beta,opera-developer}-flags.conf; do - remove_chromium_vaapi_features "$flags_file" -done diff --git a/migrations/1778291336.sh b/migrations/1778291336.sh deleted file mode 100644 index 7edb633c..00000000 --- a/migrations/1778291336.sh +++ /dev/null @@ -1,3 +0,0 @@ -echo "Persist Bluetooth power state across reboots" - -sudo sed -i 's/^#\?AutoEnable=.*/AutoEnable=false/' /etc/bluetooth/main.conf diff --git a/migrations/1778307905.sh b/migrations/1778307905.sh deleted file mode 100644 index fdcbaeaf..00000000 --- a/migrations/1778307905.sh +++ /dev/null @@ -1,4 +0,0 @@ -echo "Remove Omarchy cliamp desktop stub and icon (replace by package inclusion)" - -rm -f ~/.local/share/applications/Cliamp.desktop -rm -f ~/.local/share/applications/icons/Cliamp.png diff --git a/migrations/1778321093.sh b/migrations/1778321093.sh deleted file mode 100644 index 72a551f6..00000000 --- a/migrations/1778321093.sh +++ /dev/null @@ -1,92 +0,0 @@ -echo "Migrate Hyprland user config from Omarchy hyprlang files to Lua files" - -hypr_config_dir="$HOME/.config/hypr" -omarchy_hypr_config_dir="$OMARCHY_PATH/config/hypr" -toggle_state_dir="$HOME/.local/state/omarchy/toggles/hypr" -toggle_defaults_dir="$OMARCHY_PATH/default/hypr/toggles" -timestamp=$(date +%s) - -lua_escape() { - local value="$1" - value="${value//\\/\\\\}" - value="${value//\"/\\\"}" - printf '%s' "$value" -} - -mkdir -p "$hypr_config_dir" "$toggle_state_dir" - -for lua_config in "$omarchy_hypr_config_dir"/*.lua "$omarchy_hypr_config_dir"/.luarc.json; do - if [[ -f $lua_config ]]; then - cp -f "$lua_config" "$hypr_config_dir/" - fi -done - -for config_name in autostart bindings hyprland input looknfeel monitors; do - conf_file="$hypr_config_dir/$config_name.conf" - - if [[ -f $conf_file ]]; then - mv "$conf_file" "$conf_file.bak.$timestamp" - fi -done - -for conf_toggle in "$toggle_state_dir"/*.conf; do - [[ -f $conf_toggle ]] || continue - - toggle_name=$(basename "$conf_toggle" .conf) - lua_toggle="$toggle_state_dir/$toggle_name.lua" - - if [[ ! -f $lua_toggle ]]; then - case "$toggle_name" in - flags | single-window-aspect-ratio | window-no-gaps) - if [[ -f $toggle_defaults_dir/$toggle_name.lua ]]; then - cp -f "$toggle_defaults_dir/$toggle_name.lua" "$lua_toggle" - fi - ;; - internal-monitor-disable) - monitor=$(sed -nE 's/^monitor=([^,]+),disable.*$/\1/p' "$conf_toggle" | head -n 1) - if [[ -n $monitor ]]; then - printf 'hl.monitor({ output = "%s", disabled = true })\n' "$(lua_escape "$monitor")" >"$lua_toggle" - fi - ;; - internal-monitor-mirror) - monitor_line=$(grep -E '^monitor=' "$conf_toggle" | head -n 1) - external=$(printf '%s' "$monitor_line" | cut -d, -f1 | sed 's/^monitor=//') - internal=$(printf '%s' "$monitor_line" | awk -F',[[:space:]]*mirror,[[:space:]]*' '{ print $2 }') - if [[ -n $external && -n $internal ]]; then - printf 'hl.monitor({ output = "%s", mode = "preferred", position = "auto", scale = 1, mirror = "%s" })\n' "$(lua_escape "$external")" "$(lua_escape "$internal")" >"$lua_toggle" - fi - ;; - touchpad-disabled | touchscreen-disabled) - device=$(sed -nE 's/^[[:space:]]*name[[:space:]]*=[[:space:]]*(.*)$/\1/p' "$conf_toggle" | head -n 1) - if [[ -n $device ]]; then - printf 'hl.device({ name = "%s", enabled = false })\n' "$(lua_escape "$device")" >"$lua_toggle" - fi - ;; - esac - fi - - mv "$conf_toggle" "$conf_toggle.bak.$timestamp" -done - -sddm_hypr_conf="/usr/share/sddm/hyprland.conf" -sddm_hypr_lua="/usr/share/sddm/hyprland.lua" -sddm_wayland_conf="/etc/sddm.conf.d/10-wayland.conf" - -if [[ -f $sddm_hypr_conf || -f $sddm_wayland_conf ]]; then - if [[ -f $OMARCHY_PATH/default/sddm/hyprland.lua ]]; then - sudo mkdir -p /usr/share/sddm - sudo cp "$OMARCHY_PATH/default/sddm/hyprland.lua" "$sddm_hypr_lua" - fi - - if [[ -f $sddm_wayland_conf ]]; then - sudo sed -i 's|/usr/share/sddm/hyprland\.conf|/usr/share/sddm/hyprland.lua|g' "$sddm_wayland_conf" - fi - - if [[ -f $sddm_hypr_conf ]]; then - sudo mv "$sddm_hypr_conf" "$sddm_hypr_conf.bak.$timestamp" - fi -fi - -omarchy-state set reboot-required - -echo "Hyprland must be restarted to switch from hyprland.conf to hyprland.lua. Log out and back in, or reboot when ready." diff --git a/migrations/1778346208.sh b/migrations/1778346208.sh deleted file mode 100644 index 89ab6ebd..00000000 --- a/migrations/1778346208.sh +++ /dev/null @@ -1,11 +0,0 @@ -echo "Fix fontconfig monospace binding so app-specific fonts are not overridden" - -if [[ -f ~/.config/fontconfig/fonts.conf ]] && command -v xmlstarlet >/dev/null 2>&1; then - xmlstarlet ed -L \ - -u '//match[@target="pattern"][test/string="monospace"]/edit[@name="family"]/@mode' \ - -v "append" \ - -u '//match[@target="pattern"][test/string="monospace"]/edit[@name="family"]/@binding' \ - -v "same" \ - ~/.config/fontconfig/fonts.conf - fc-cache -f >/dev/null 2>&1 -fi diff --git a/migrations/1778388568.sh b/migrations/1778388568.sh deleted file mode 100644 index 220068f3..00000000 --- a/migrations/1778388568.sh +++ /dev/null @@ -1,3 +0,0 @@ -echo "Viewing multiple files via imv should use trash for delete and ctrl+e for editing via satty" - -omarchy-refresh-config imv/config diff --git a/migrations/1778506941.sh b/migrations/1778506941.sh deleted file mode 100644 index e9e4f638..00000000 --- a/migrations/1778506941.sh +++ /dev/null @@ -1,3 +0,0 @@ -echo "Install quickshell for the image selector" - -omarchy-pkg-add quickshell diff --git a/migrations/1778510426.sh b/migrations/1778510426.sh deleted file mode 100644 index d8ee28eb..00000000 --- a/migrations/1778510426.sh +++ /dev/null @@ -1,15 +0,0 @@ -echo "Add a Tmux keybindings menu" - -tmux_config="$HOME/.config/tmux/tmux.conf" - -if [[ -f $tmux_config ]] && ! grep -q "omarchy-menu-tmux-keybindings" "$tmux_config"; then - if ! grep -Eq '^[[:space:]]*bind(-key)?[[:space:]]+(\?|-T[[:space:]]+prefix[[:space:]]+\?)' "$tmux_config"; then - if grep -q '^bind q source-file .*Configuration reloaded' "$tmux_config"; then - sed -i '/^bind q source-file .*Configuration reloaded/a bind ? display-popup -E -w 80% -h 70% -T "Tmux keybindings" "omarchy-menu-tmux-keybindings --print | less -R"' "$tmux_config" - else - printf '\n# Keybinding help\nbind ? display-popup -E -w 80%% -h 70%% -T "Tmux keybindings" "omarchy-menu-tmux-keybindings --print | less -R"\n' >> "$tmux_config" - fi - - omarchy-restart-tmux - fi -fi diff --git a/migrations/1778743515.sh b/migrations/1778743515.sh deleted file mode 100644 index 22d26493..00000000 --- a/migrations/1778743515.sh +++ /dev/null @@ -1,24 +0,0 @@ -echo "Flip from waybar + mako + swaybg to omarchy-shell (quickshell-backed bar and notifications)" - -omarchy-pkg-add quickshell - -# mako is replaced by the omarchy-shell notification plugin. -pkill -x mako 2>/dev/null || true -systemctl --user disable --now mako.service 2>/dev/null || true -omarchy-pkg-drop mako -rm -rf ~/.config/mako -rm -f ~/.local/state/omarchy/toggles/mako.ini - -# waybar is replaced by the omarchy-shell bar plugin -pkill -x waybar 2>/dev/null || true -omarchy-pkg-drop waybar -if [[ -d ~/.config/waybar ]]; then - mv ~/.config/waybar "$HOME/.config/waybar.omarchy-shell.bak.$(date +%s)" -fi -rm -f ~/.local/state/omarchy/toggles/waybar-off - -# swaybg is replaced with integrated background in shell -pkill -x swaybg 2>/dev/null || true -omarchy-pkg-drop swaybg - -omarchy-restart-shell diff --git a/migrations/1778752973.sh b/migrations/1778752973.sh deleted file mode 100644 index ed1facc8..00000000 --- a/migrations/1778752973.sh +++ /dev/null @@ -1,26 +0,0 @@ -echo "Add Alt+Enter split and Alt+Escape close keybindings to tmux" - -tmux_config="$HOME/.config/tmux/tmux.conf" - -if [[ -f $tmux_config ]]; then - changed=0 - - if ! grep -qxF 'bind -n M-Enter split-window -v -c "#{pane_current_path}"' "$tmux_config"; then - printf '\nbind -n M-Enter split-window -v -c "#{pane_current_path}"\n' >>"$tmux_config" - changed=1 - fi - - if ! grep -qxF 'bind -n M-S-Enter split-window -h -c "#{pane_current_path}"' "$tmux_config"; then - printf 'bind -n M-S-Enter split-window -h -c "#{pane_current_path}"\n' >>"$tmux_config" - changed=1 - fi - - if ! grep -qxF 'bind -n M-Escape kill-pane' "$tmux_config"; then - printf 'bind -n M-Escape kill-pane\n' >>"$tmux_config" - changed=1 - fi - - if (( changed )); then - omarchy-restart-tmux - fi -fi diff --git a/migrations/1778847256.sh b/migrations/1778847256.sh deleted file mode 100644 index 8f4a8b15..00000000 --- a/migrations/1778847256.sh +++ /dev/null @@ -1,3 +0,0 @@ -echo "Refresh theme files to pick up Hyprland changes" - -omarchy-theme-refresh diff --git a/migrations/1778847558.sh b/migrations/1778847558.sh deleted file mode 100644 index 9494ba7e..00000000 --- a/migrations/1778847558.sh +++ /dev/null @@ -1,3 +0,0 @@ -echo "Refresh Hyprland Lua language server config" - -omarchy-refresh-config hypr/.luarc.json diff --git a/migrations/1778851263.sh b/migrations/1778851263.sh deleted file mode 100644 index 3b3a4fe7..00000000 --- a/migrations/1778851263.sh +++ /dev/null @@ -1,11 +0,0 @@ -echo "Set BROWSER to Omarchy browser launcher for detached terminal URL opens" - -if [[ -f ~/.config/uwsm/default ]]; then - if grep -q '^export BROWSER=' ~/.config/uwsm/default; then - sed -i 's|^export BROWSER=.*|export BROWSER=omarchy-launch-browser|' ~/.config/uwsm/default - else - printf '\n# Used by terminal programs (like gh) to open URLs detached from the terminal process tree\nexport BROWSER=omarchy-launch-browser\n' >> ~/.config/uwsm/default - fi -else - omarchy-refresh-config uwsm/default -fi diff --git a/migrations/1778956449.sh b/migrations/1778956449.sh deleted file mode 100644 index 443d8893..00000000 --- a/migrations/1778956449.sh +++ /dev/null @@ -1,13 +0,0 @@ -echo "Switch polkit authentication to omarchy-shell" - -# The default Hyprland autostart now uses omarchy-shell's native Quickshell -# Polkit agent. Remove any stale user override that starts the old GTK agent. -if [[ -f ~/.config/hypr/autostart.lua ]]; then - sed -i '/polkit-gnome-authentication-agent-1/d' ~/.config/hypr/autostart.lua -fi - -pkill -u "$USER" -f '^/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1$' 2>/dev/null || true - -omarchy-pkg-drop polkit-gnome - -omarchy-restart-shell diff --git a/migrations/1779047753.sh b/migrations/1779047753.sh deleted file mode 100644 index d430a45f..00000000 --- a/migrations/1779047753.sh +++ /dev/null @@ -1,8 +0,0 @@ -echo "Use omarchy-shell as the Quickshell IPC entry point" - -for file in ~/.config/hypr/bindings.lua ~/.config/hypr/bindings/*.lua; do - [[ -f $file ]] || continue - sed -i 's/omarchy-shell-ipc-fast/omarchy-shell/g; s/omarchy-shell-ipc/omarchy-shell/g; s/omarchy-shell[[:space:]]\+--if-running/omarchy-shell/g' "$file" -done - -omarchy-restart-shell diff --git a/migrations/1779107651.sh b/migrations/1779107651.sh deleted file mode 100644 index f8b83016..00000000 --- a/migrations/1779107651.sh +++ /dev/null @@ -1,7 +0,0 @@ -echo "Move omarchy-shell to the top-level shell directory" - -if omarchy-cmd-present quickshell; then - quickshell kill -p "$OMARCHY_PATH/default/quickshell"/omarchy-shell >/dev/null 2>&1 || true -fi - -omarchy-restart-shell diff --git a/migrations/1779137438.sh b/migrations/1779137438.sh deleted file mode 100644 index eb9e5eb5..00000000 --- a/migrations/1779137438.sh +++ /dev/null @@ -1,3 +0,0 @@ -echo "Remove bluetui and impala packages" - -omarchy-pkg-drop bluetui impala diff --git a/migrations/1779171487.sh b/migrations/1779171487.sh deleted file mode 100644 index 1618efa5..00000000 --- a/migrations/1779171487.sh +++ /dev/null @@ -1,3 +0,0 @@ -echo "Install qemu-user-static-binfmt for multi-arch Docker image building" - -omarchy-pkg-add qemu-user-static-binfmt diff --git a/migrations/1779180647.sh b/migrations/1779180647.sh deleted file mode 100644 index 63f24e0d..00000000 --- a/migrations/1779180647.sh +++ /dev/null @@ -1,11 +0,0 @@ -echo "Remove the omarchy-shell user service and old standalone Quickshells" - -systemctl --user disable --now omarchy-shell.service >/dev/null 2>&1 || true -rm -f ~/.config/systemd/user/omarchy-shell.service -systemctl --user daemon-reload >/dev/null 2>&1 || true - -for pid in $(pgrep -f "quickshell .* -p $OMARCHY_PATH/default/quickshell/(menu|select-by-image)\.qml" || true); do - kill "$pid" 2>/dev/null || true -done - -omarchy-restart-shell diff --git a/migrations/1779182943.sh b/migrations/1779182943.sh deleted file mode 100644 index da3cf09c..00000000 --- a/migrations/1779182943.sh +++ /dev/null @@ -1,10 +0,0 @@ -echo "Move idle handling from hypridle to omarchy-shell" - -if [[ -f ~/.config/hypr/autostart.lua ]]; then - sed -i '/hypridle/d' ~/.config/hypr/autostart.lua -fi - -omarchy-refresh-shell -pkill -x hypridle 2>/dev/null || true -omarchy-pkg-drop hypridle -omarchy-restart-shell || true diff --git a/migrations/1779184948.sh b/migrations/1779184948.sh deleted file mode 100644 index fcbee559..00000000 --- a/migrations/1779184948.sh +++ /dev/null @@ -1,9 +0,0 @@ -echo "Switch lock screen authentication to Quickshell" - -omarchy-setup-lock - -rm -f ~/.local/state/omarchy/toggles/hyprlock.conf ~/.local/state/omarchy/toggles/lock.conf - -rm -f ~/.config/hypr/hyprlock.conf ~/.config/omarchy/current/theme/hyprlock.conf - -omarchy-pkg-drop hyprlock diff --git a/migrations/1779203294.sh b/migrations/1779203294.sh deleted file mode 100644 index 29335b12..00000000 --- a/migrations/1779203294.sh +++ /dev/null @@ -1,12 +0,0 @@ -echo "Remove Wiremix audio mixer" - -if omarchy-pkg-present wiremix; then - omarchy-pkg-drop wiremix -fi - -rm -rf "$HOME/.config/wiremix" -rm -f "$HOME/.local/share/applications/wiremix.desktop" - -if omarchy-cmd-present update-desktop-database; then - update-desktop-database "$HOME/.local/share/applications" >/dev/null 2>&1 || true -fi diff --git a/migrations/1779210892.sh b/migrations/1779210892.sh deleted file mode 100644 index bf8adc11..00000000 --- a/migrations/1779210892.sh +++ /dev/null @@ -1,32 +0,0 @@ -echo "Remove Walker launcher services and Elephant providers" - -pkill elephant 2>/dev/null || true -systemctl --user disable --now elephant.service 2>/dev/null || true -systemctl --user disable --now app-walker@autostart.service 2>/dev/null || true -rm -f ~/.config/autostart/walker.desktop -rm -rf ~/.config/elephant -rm -rf ~/.config/systemd/user/app-walker@autostart.service.d -sudo rm -f /etc/pacman.d/hooks/walker-restart.hook - -for bindings_file in ~/.config/hypr/bindings/utilities.lua ~/.config/hypr/bindings.lua; do - if [[ -f $bindings_file ]]; then - sed -i 's#omarchy-launch-walker#omarchy-shell shell toggle omarchy.launcher \\"{}\\"#g' "$bindings_file" - fi -done - -omarchy-pkg-drop \ - omarchy-walker \ - elephant-all \ - elephant \ - elephant-calc \ - elephant-clipboard \ - elephant-bluetooth \ - elephant-desktopapplications \ - elephant-files \ - elephant-menus \ - elephant-providerlist \ - elephant-runner \ - elephant-symbols \ - elephant-unicode \ - elephant-websearch \ - elephant-todo diff --git a/migrations/1779216860.sh b/migrations/1779216860.sh deleted file mode 100644 index b1cd08be..00000000 --- a/migrations/1779216860.sh +++ /dev/null @@ -1,7 +0,0 @@ -echo "Remove retired rounded-corners Hyprland toggle" - -rm -f "$HOME/.local/state/omarchy/toggles/hypr/rounded-corners.lua" - -if omarchy-cmd-present hyprctl; then - hyprctl reload >/dev/null 2>&1 || true -fi diff --git a/migrations/1779218170.sh b/migrations/1779218170.sh deleted file mode 100644 index 9a76cb1a..00000000 --- a/migrations/1779218170.sh +++ /dev/null @@ -1,5 +0,0 @@ -echo "Move low battery notifications into omarchy-shell" - -systemctl --user disable --now omarchy-battery-monitor.timer 2>/dev/null || true -rm -f "$HOME/.config/systemd/user/omarchy-battery-monitor.service" "$HOME/.config/systemd/user/omarchy-battery-monitor.timer" -systemctl --user daemon-reload 2>/dev/null || true diff --git a/migrations/1779219192.sh b/migrations/1779219192.sh deleted file mode 100644 index 17aaada8..00000000 --- a/migrations/1779219192.sh +++ /dev/null @@ -1,23 +0,0 @@ -echo "Move default editor selection to ~/.local/state/omarchy/defaults/editor" - -editor=$(sed -n 's/^export EDITOR=//p' ~/.config/uwsm/default 2>/dev/null | head -n 1) - -if [[ -z $editor || $editor == "omarchy-launch-editor" || $editor == "omarchy-launch-editor --inline" || $editor == '"omarchy-launch-editor --inline"' ]]; then - editor="nvim" -fi - -mkdir -p "$HOME/.local/state/omarchy/defaults" - -if [[ ! -f $HOME/.local/state/omarchy/defaults/editor ]]; then - printf '%s\n' "$editor" >"$HOME/.local/state/omarchy/defaults/editor" -fi - -if [[ -f ~/.config/uwsm/default ]]; then - if grep -q '^export EDITOR=' ~/.config/uwsm/default; then - sed -i 's|^export EDITOR=.*|export EDITOR="omarchy-launch-editor --inline"|' ~/.config/uwsm/default - else - printf '\n# Used by terminal programs to open files with the selected Omarchy default editor\nexport EDITOR="omarchy-launch-editor --inline"\n' >>~/.config/uwsm/default - fi -else - omarchy-refresh-config uwsm/default -fi diff --git a/migrations/1779232736.sh b/migrations/1779232736.sh deleted file mode 100644 index c554d7fb..00000000 --- a/migrations/1779232736.sh +++ /dev/null @@ -1,20 +0,0 @@ -echo "Install bluetooth pairing agent for the shell bluetoothPanel" - -# Hold bluez explicit so a future cascade-remove (e.g. uninstalling a TUI -# that listed it as a dep) doesn't take it down with it. Idempotent if it -# already is. -omarchy-cmd-present pacman && sudo pacman -D --asexplicit bluez >/dev/null 2>&1 || true - -# Quickshell.Bluetooth exposes pair()/trust()/connect() but no Agent surface, -# so the bluetoothPanel can't answer the auth prompts bluez issues during -# pair(). Without an org.bluez.Agent1 registered, pair() stalls at the -# confirmation step and the device ends up half-paired (Paired:no, -# Trusted:yes), then connect attempts fail with br-connection-key-missing. -# bluez-tools' bt-agent fills that gap; bluez-utils provides bluetoothctl -# for manual recovery. -omarchy-pkg-add bluez-utils bluez-tools - -mkdir -p ~/.config/systemd/user/ -cp "$OMARCHY_PATH/config/systemd/user/bt-agent.service" ~/.config/systemd/user/ -systemctl --user daemon-reload -systemctl --user enable --now bt-agent.service diff --git a/migrations/1779242346.sh b/migrations/1779242346.sh deleted file mode 100644 index c07ba7d2..00000000 --- a/migrations/1779242346.sh +++ /dev/null @@ -1,5 +0,0 @@ -echo "Replace Pi's Omarchy light/dark extension with the generated omarchy-system theme" - -rm -f "$HOME/.pi/agent/extensions/omarchy-system-theme.ts" -omarchy-theme-refresh -omarchy-theme-set-pi --activate diff --git a/migrations/1779259320.sh b/migrations/1779259320.sh deleted file mode 100644 index 283b3e1d..00000000 --- a/migrations/1779259320.sh +++ /dev/null @@ -1,3 +0,0 @@ -echo "Rename bar indicators to their shell.json indicator block names" - -omarchy-refresh-shell diff --git a/migrations/1779277899.sh b/migrations/1779277899.sh deleted file mode 100644 index c5fdfaf9..00000000 --- a/migrations/1779277899.sh +++ /dev/null @@ -1,26 +0,0 @@ -echo "Rename shell plugins" - -config_files=( - "$HOME/.config/hypr/bindings/utilities.lua" - "$HOME/.config/hypr/bindings.lua" - "$HOME/.config/hypr/apps/omarchy-shell.lua" - "$HOME/.config/omarchy/omarchy-menu.jsonc" - "$HOME/.config/omarchy/current/theme/shell.toml" -) - -for config_file in "${config_files[@]}"; do - if [[ -f $config_file ]]; then - sed -i \ - -e 's/omarchy\.app-launcher/omarchy.launcher/g' \ - -e 's/omarchy\.battery-monitor/omarchy.battery/g' \ - -e 's/omarchy\.clipboard-picker/omarchy.clipboard/g' \ - -e 's/omarchy\.emoji-picker/omarchy.emojis/g' \ - -e 's/omarchy-app-launcher/omarchy-launcher/g' \ - -e 's/omarchy-battery-monitor/omarchy-battery/g' \ - -e 's/omarchy-clipboard-picker/omarchy-clipboard/g' \ - -e 's/omarchy-emoji-picker/omarchy-emojis/g' \ - -e 's/\[app-launcher\]/[launcher]/g' \ - -e 's/app-launcher\./launcher./g' \ - "$config_file" - fi -done diff --git a/migrations/1779283409.sh b/migrations/1779283409.sh deleted file mode 100644 index 47b94a7b..00000000 --- a/migrations/1779283409.sh +++ /dev/null @@ -1,70 +0,0 @@ -echo "Add Night Light to the default bar indicator list" - -config_file="$HOME/.config/omarchy/shell.json" - -if [[ -f $config_file ]] && omarchy-cmd-present jq; then - tmp=$(mktemp) - jq ' - def indicator_id: - if type == "string" then - . - elif type == "object" then - (.id // "") - else - "" - end; - - def has_indicator($id): - any(.[]?; indicator_id == $id); - - def indicator_index($id): - [range(0; length) as $i | select((.[$i] | indicator_id) == $id) | $i][0]; - - def nightlight_entry: - if any(.[]?; type == "object") then - { id: "nightlight" } - else - "nightlight" - end; - - def add_nightlight: - if type != "array" or has_indicator("nightlight") then - . - else - (indicator_index("dnd")) as $dnd_index | - if $dnd_index == null then - . - else - .[0:$dnd_index + 1] + [nightlight_entry] + .[$dnd_index + 1:] - end - end; - - .bar.layout |= ( - if type == "object" then - with_entries( - .value |= ( - if type == "array" then - map( - if type == "object" and .id == "indicators" then - if (.items | type) == "array" then - .items |= add_nightlight - elif (.indicators | type) == "array" then - .indicators |= add_nightlight - else - . - end - else - . - end - ) - else - . - end - ) - ) - else - . - end - ) - ' "$config_file" >"$tmp" && mv "$tmp" "$config_file" || rm -f "$tmp" -fi diff --git a/migrations/1779286136.sh b/migrations/1779286136.sh deleted file mode 100644 index ffcf0cee..00000000 --- a/migrations/1779286136.sh +++ /dev/null @@ -1,90 +0,0 @@ -echo "Replace the old Stay Awake bar widget with the Stay Awake indicator" - -config_file="$HOME/.config/omarchy/shell.json" - -if [[ -f $config_file ]] && omarchy-cmd-present jq; then - tmp=$(mktemp) - jq ' - def entry_id: - if type == "string" then - . - elif type == "object" then - (.id // "") - else - "" - end; - - def indicator_id: - if type == "string" then - . - elif type == "object" then - (.id // "") - else - "" - end; - - def has_indicator($id): - any(.[]?; indicator_id == $id); - - def stay_awake_entry: - if any(.[]?; type == "object") then - { id: "stayAwake" } - else - "stayAwake" - end; - - def add_stay_awake: - if type != "array" or has_indicator("stayAwake") then - . - else - . + [stay_awake_entry] - end; - - def update_indicators: - if type == "object" and .id == "indicators" then - if (.items | type) == "array" then - .items |= add_stay_awake - elif (.indicators | type) == "array" then - .indicators |= add_stay_awake - else - .items = ["stayAwake"] - end - elif type == "string" and . == "indicators" then - { id: "indicators", items: ["stayAwake"] } - else - . - end; - - def replace_idle_when_no_indicators: - reduce .[] as $entry ( - { rows: [], inserted: false }; - if ($entry | entry_id) == "idleInhibitor" then - if .inserted then - . - else - .rows += [{ id: "indicators", items: ["stayAwake"] }] | .inserted = true - end - else - .rows += [$entry] - end - ) | .rows; - - def replace_idle_inhibitor($has_indicators): - if type != "array" then - . - elif $has_indicators then - [ .[] | select(entry_id != "idleInhibitor") | update_indicators ] - else - replace_idle_when_no_indicators - end; - - (.bar.layout | [ .[]?[]? | select(entry_id == "indicators") ] | length > 0) as $has_indicators | - .bar.layout |= ( - if type == "object" then - with_entries(.value |= replace_idle_inhibitor($has_indicators)) - else - . - end - ) - ' "$config_file" >"$tmp" && mv "$tmp" "$config_file" || rm -f "$tmp" -fi diff --git a/migrations/1779287628.sh b/migrations/1779287628.sh deleted file mode 100644 index b606ef4b..00000000 --- a/migrations/1779287628.sh +++ /dev/null @@ -1,46 +0,0 @@ -echo "Rename the default Calendar bar widget to Daytime" - -config_file="$HOME/.config/omarchy/shell.json" - -if [[ -f $config_file ]] && omarchy-cmd-present jq; then - tmp=$(mktemp) - jq ' - def update_daytime_entry: - if type == "string" and (. == "calendar" or . == "datetime") then - "daytime" - elif type == "object" then - ( - if .id == "calendar" or .id == "datetime" then - .id = "daytime" - else - . - end - ) | ( - if .id == "daytime" and (.formatAlt // "") == "dd MMMM \u0027W\u0027ww yyyy" then - .formatAlt = "dd MMMM yyyy" - else - . - end - ) - else - . - end; - - .bar.centerAnchor |= if . == "calendar" or . == "datetime" then "daytime" else . end | - .bar.layout |= ( - if type == "object" then - with_entries( - .value |= ( - if type == "array" then - map(update_daytime_entry) - else - . - end - ) - ) - else - . - end - ) - ' "$config_file" >"$tmp" && mv "$tmp" "$config_file" || rm -f "$tmp" -fi diff --git a/migrations/1779297337.sh b/migrations/1779297337.sh deleted file mode 100644 index 1c48eb6f..00000000 --- a/migrations/1779297337.sh +++ /dev/null @@ -1,5 +0,0 @@ -echo "Enable Voxtype keybindings toggle for existing installs" - -if omarchy-cmd-present voxtype; then - omarchy-hyprland-toggle voxtype on -fi diff --git a/migrations/1779303581.sh b/migrations/1779303581.sh deleted file mode 100644 index 4ec35337..00000000 --- a/migrations/1779303581.sh +++ /dev/null @@ -1,35 +0,0 @@ -echo "Clean up the old per-script /etc files now owned by omarchy-settings package" - -# ssh-flakiness.sh used to append `net.ipv4.tcp_mtu_probing=1` to the -# conventionally-user-owned /etc/sysctl.d/99-sysctl.conf. The setting now ships -# at /etc/sysctl.d/99-omarchy-sysctl.conf via the package. Strip the line from -# the old path if it's there (leave the rest of 99-sysctl.conf alone). -if [[ -f /etc/sysctl.d/99-sysctl.conf ]] && grep -q '^net\.ipv4\.tcp_mtu_probing=1' /etc/sysctl.d/99-sysctl.conf; then - sudo sed -i '/^net\.ipv4\.tcp_mtu_probing=1$/d' /etc/sysctl.d/99-sysctl.conf -fi - -# usb-autosuspend.sh used /etc/modprobe.d/disable-usb-autosuspend.conf; package -# now owns /etc/modprobe.d/omarchy-usb-autosuspend.conf. Remove the old file. -sudo rm -f /etc/modprobe.d/disable-usb-autosuspend.conf - -# Sudoers renames: passwd-tries -> omarchy-passwd-tries; asdcontrol -> omarchy-asdcontrol. -sudo rm -f /etc/sudoers.d/passwd-tries -sudo rm -f /etc/sudoers.d/asdcontrol - -# fast-shutdown.sh used to ship user@.service.d/faster-shutdown.conf; the -# package owns user@.service.d/10-faster-shutdown.conf. Both would apply -# simultaneously, so remove the old. -sudo rm -f /etc/systemd/system/user@.service.d/faster-shutdown.conf - -# ignore-power-button.sh used to `sed` HandlePowerKey=ignore directly into -# /etc/systemd/logind.conf. The package now ships a drop-in at -# /etc/systemd/logind.conf.d/10-ignore-power-button.conf, which wins regardless, -# but reset the main file's line back to its commented default so future -# changes to the drop-in aren't shadowed. -if [[ -f /etc/systemd/logind.conf ]] && grep -q '^HandlePowerKey=ignore' /etc/systemd/logind.conf; then - sudo sed -i 's/^HandlePowerKey=ignore$/#HandlePowerKey=poweroff/' /etc/systemd/logind.conf -fi - -# Reload anything that watches these files so the changes take effect now. -sudo systemctl daemon-reload || true -sudo sysctl --system >/dev/null 2>&1 || true diff --git a/migrations/1779307210.sh b/migrations/1779307210.sh deleted file mode 100644 index c3f8fd41..00000000 --- a/migrations/1779307210.sh +++ /dev/null @@ -1,6 +0,0 @@ -echo "Restricting passwordless timedatectl access to timezone updates" - -sudo tee /etc/sudoers.d/omarchy-tzupdate >/dev/null </dev/null || true -systemctl --user enable --now omarchy-sleep-lock.service diff --git a/migrations/1779350210.sh b/migrations/1779350210.sh deleted file mode 100644 index d0e1fa43..00000000 --- a/migrations/1779350210.sh +++ /dev/null @@ -1,12 +0,0 @@ -echo "Switch Wi-Fi management from iwd to NetworkManager" - -omarchy-pkg-add networkmanager - -sudo systemctl enable --now NetworkManager.service -sudo systemctl disable --now iwd.service 2>/dev/null || true -omarchy-pkg-drop iwd - -nmcli networking on -nmcli radio wifi on - -omarchy-state set reboot-required diff --git a/migrations/1779357523.sh b/migrations/1779357523.sh deleted file mode 100644 index 43fa93ba..00000000 --- a/migrations/1779357523.sh +++ /dev/null @@ -1,75 +0,0 @@ -echo "Move launcher hides from hidden desktop overrides to launcher.hides" - -remove_legacy_hidden_override() { - local file=$1 - local line - local found_section=false - local found_hidden=false - - [[ -f $file ]] || return - - while IFS= read -r line || [[ -n $line ]]; do - line=${line%$'\r'} - [[ -z $line ]] && continue - - case $line in - "[Desktop Entry]") - found_section=true - ;; - "Hidden=true") - found_hidden=true - ;; - *) - return - ;; - esac - done < "$file" - - if [[ $found_section == "true" && $found_hidden == "true" ]]; then - rm -f "$file" - fi -} - -for app in \ - avahi-discover \ - bssh \ - btop \ - bvnc \ - cmake-gui \ - cups \ - dropbox \ - electron34 \ - electron36 \ - electron37 \ - fcitx5-configtool \ - fcitx5-wayland-launcher \ - foot-server \ - footclient \ - java-java-openjdk \ - jconsole-java-openjdk \ - jshell-java-openjdk \ - kbd-layout-viewer5 \ - kcm_fcitx5 \ - kcm_kaccounts \ - kvantummanager \ - libreoffice-base \ - libreoffice-draw \ - libreoffice-math \ - libreoffice-startcenter \ - libreoffice-xsltfilter \ - limine-snapper-restore \ - lstopo \ - org.fcitx.Fcitx5 \ - org.fcitx.fcitx5-config-qt \ - org.fcitx.fcitx5-migrator \ - org.fcitx.fcitx5-qt5-gui-wrapper \ - org.fcitx.fcitx5-qt6-gui-wrapper \ - qv4l2 \ - qvidcap \ - uuctl \ - xgps \ - xgpsspeed; do - remove_legacy_hidden_override "$HOME/.local/share/applications/$app.desktop" -done - -update-desktop-database "$HOME/.local/share/applications" &>/dev/null || true diff --git a/migrations/1779449206.sh b/migrations/1779449206.sh deleted file mode 100644 index 21ec629b..00000000 --- a/migrations/1779449206.sh +++ /dev/null @@ -1,11 +0,0 @@ -echo "Use inline Omarchy editor launcher for terminal EDITOR" - -if [[ -f ~/.config/uwsm/default ]]; then - if grep -q '^export EDITOR=omarchy-launch-editor$' ~/.config/uwsm/default; then - sed -i 's|^export EDITOR=omarchy-launch-editor$|export EDITOR="omarchy-launch-editor --inline"|' ~/.config/uwsm/default - elif ! grep -q '^export EDITOR=' ~/.config/uwsm/default; then - printf '\n# Used by terminal programs to open files with the selected Omarchy default editor\nexport EDITOR="omarchy-launch-editor --inline"\n' >>~/.config/uwsm/default - fi -else - omarchy-refresh-config uwsm/default -fi diff --git a/migrations/1779481017.sh b/migrations/1779481017.sh deleted file mode 100644 index 2fc9b01a..00000000 --- a/migrations/1779481017.sh +++ /dev/null @@ -1,41 +0,0 @@ -echo "Namespace Omarchy built-in bar widget ids in shell.json" - -config_file="$HOME/.config/omarchy/shell.json" - -if [[ -s $config_file ]] && jq -e 'type == "object" and .version == 1' "$config_file" >/dev/null 2>&1; then - tmp=$(mktemp) - jq ' - def canonical_widget_id: - if . == "Omarchy" then "omarchy.menu" - elif . == "Workspaces" then "omarchy.workspaces" - elif . == "Media" then "omarchy.media" - elif . == "AudioPanel" then "omarchy.audio" - elif . == "MonitorPanel" then "omarchy.monitor" - elif . == "NetworkPanel" then "omarchy.network" - elif . == "PowerPanel" then "omarchy.power" - elif . == "BluetoothPanel" then "omarchy.bluetooth" - elif . == "Clock" then "omarchy.clock" - elif . == "Indicators" then "omarchy.indicators" - elif . == "NotificationCenter" then "omarchy.notifications" - elif . == "SystemUpdate" then "omarchy.system-update" - elif . == "SystemStats" then "omarchy.system-stats" - elif . == "Tray" then "omarchy.tray" - elif . == "Weather" then "omarchy.weather" - elif . == "Microphone" then "omarchy.microphone" - elif . == "ActiveWindow" then "omarchy.active-window" - elif . == "KeyboardLayout" then "omarchy.keyboard-layout" - elif . == "LockKeys" then "omarchy.lock-keys" - elif . == "Spacer" then "omarchy.spacer" - else . end; - - def canonical_entry: - if type == "string" then canonical_widget_id - elif type == "object" and has("id") then .id = (.id | canonical_widget_id) - else . end; - - .bar.centerAnchor = ((.bar.centerAnchor // "") | canonical_widget_id) | - .bar.layout.left = ((.bar.layout.left // []) | map(canonical_entry)) | - .bar.layout.center = ((.bar.layout.center // []) | map(canonical_entry)) | - .bar.layout.right = ((.bar.layout.right // []) | map(canonical_entry)) - ' "$config_file" >"$tmp" && mv "$tmp" "$config_file" -fi diff --git a/migrations/1779627463.sh b/migrations/1779627463.sh deleted file mode 100644 index 85d7bb46..00000000 --- a/migrations/1779627463.sh +++ /dev/null @@ -1,42 +0,0 @@ -echo "Place the system update indicator next to weather in the bar" - -config_file="$HOME/.config/omarchy/shell.json" - -if [[ -s $config_file ]] && omarchy-cmd-present jq; then - tmp=$(mktemp) - jq ' - def entry_id: - if type == "string" then - . - elif type == "object" then - (.id // "") - else - "" - end; - - def entry_index($id): - [range(0; length) as $i | select((.[$i] | entry_id) == $id) | $i][0]; - - def place_update_after_weather: - if type != "array" then - . - else - (entry_index("omarchy.weather")) as $weather_index | - (entry_index("omarchy.indicators")) as $indicators_index | - (entry_index("omarchy.system-update")) as $update_index | - if $weather_index == null or $indicators_index == null or $update_index == null then - . - elif $weather_index < $indicators_index and $indicators_index < $update_index then - . as $entries | - ($entries[$update_index]) as $update_entry | - ($entries | del(.[$update_index])) as $without_update | - ($without_update | entry_index("omarchy.weather")) as $new_weather_index | - $without_update[0:$new_weather_index + 1] + [$update_entry] + $without_update[$new_weather_index + 1:] - else - . - end - end; - - .bar.layout.center |= place_update_after_weather - ' "$config_file" >"$tmp" && mv "$tmp" "$config_file" || rm -f "$tmp" -fi diff --git a/migrations/1779696759.sh b/migrations/1779696759.sh deleted file mode 100644 index cc328bd9..00000000 --- a/migrations/1779696759.sh +++ /dev/null @@ -1,50 +0,0 @@ -echo "Make Alt+Shift+Enter distinguishable for terminals and tmux" - -alacritty_config="$HOME/.config/alacritty/alacritty.toml" -ghostty_config="$HOME/.config/ghostty/config" -kitty_config="$HOME/.config/kitty/kitty.conf" -tmux_config="$HOME/.config/tmux/tmux.conf" - -tmux_changed=0 - -if [[ -f $alacritty_config ]] && ! grep -q '13;4u' "$alacritty_config"; then - if grep -q 'key = "Return", mods = "Shift", chars = "\\u001B\\r"' "$alacritty_config"; then - sed -i '/key = "Return", mods = "Shift", chars = "\\u001B\\r"/s/ }$/ },/' "$alacritty_config" - sed -i '/key = "Return", mods = "Shift", chars = "\\u001B\\r"/a # Legacy encoding sends Alt+Shift+Return the same as Alt+Return; send CSI-u so tmux can match M-S-Enter.\n{ key = "Return", mods = "Alt|Shift", chars = "\\u001B[13;4u" }' "$alacritty_config" - elif grep -q 'key = "Insert", mods = "Control", action = "Copy"' "$alacritty_config"; then - sed -i '/key = "Insert", mods = "Control", action = "Copy"/a # Legacy encoding sends Alt+Shift+Return the same as Alt+Return; send CSI-u so tmux can match M-S-Enter.\n{ key = "Return", mods = "Alt|Shift", chars = "\\u001B[13;4u" },' "$alacritty_config" - fi -fi - -if [[ -f $ghostty_config ]] && ! grep -q 'alt+shift+enter=.*13;4u' "$ghostty_config"; then - if grep -qxF 'keybind = control+insert=copy_to_clipboard' "$ghostty_config"; then - sed -i '/^keybind = control+insert=copy_to_clipboard$/a # Legacy encoding sends Alt+Shift+Enter the same as Alt+Enter; send CSI-u so tmux can match M-S-Enter.\nkeybind = alt+shift+enter=csi:13;4u' "$ghostty_config" - else - printf '\n# Legacy encoding sends Alt+Shift+Enter the same as Alt+Enter; send CSI-u so tmux can match M-S-Enter.\nkeybind = alt+shift+enter=csi:13;4u\n' >>"$ghostty_config" - fi -fi - -if [[ -f $kitty_config ]] && ! grep -Eq '^map[[:space:]]+alt\+shift\+enter[[:space:]]' "$kitty_config"; then - if grep -qxF 'map shift+insert paste_from_clipboard' "$kitty_config"; then - sed -i '/^map shift+insert paste_from_clipboard$/a # Kitty legacy encoding sends Alt+Shift+Enter the same as Alt+Enter; send CSI-u so tmux can match M-S-Enter.\nmap alt+shift+enter send_text all \\e[13;4u' "$kitty_config" - else - printf '\n# Kitty legacy encoding sends Alt+Shift+Enter the same as Alt+Enter; send CSI-u so tmux can match M-S-Enter.\nmap alt+shift+enter send_text all \\e[13;4u\n' >>"$kitty_config" - fi -fi - -if [[ -f $tmux_config ]] && grep -qxF "set -as terminal-features ',xterm-kitty:extkeys'" "$tmux_config"; then - sed -i 's/^set -as terminal-features '"'"',xterm-kitty:extkeys'"'"'$/set -g terminal-features[3] "xterm-kitty:extkeys"/' "$tmux_config" - tmux_changed=1 -elif [[ -f $tmux_config ]] && ! grep -q 'xterm-kitty:extkeys' "$tmux_config" && ! grep -Eq '^(set|set-option)[[:space:]].*terminal-features' "$tmux_config"; then - if grep -qxF 'set -g extended-keys-format csi-u' "$tmux_config"; then - sed -i '/^set -g extended-keys-format csi-u$/a set -g terminal-features[3] "xterm-kitty:extkeys"' "$tmux_config" - else - printf '\nset -g terminal-features[3] "xterm-kitty:extkeys"\n' >>"$tmux_config" - fi - - tmux_changed=1 -fi - -if (( tmux_changed )); then - omarchy-restart-tmux -fi diff --git a/migrations/1779715013.sh b/migrations/1779715013.sh deleted file mode 100644 index 033f8e07..00000000 --- a/migrations/1779715013.sh +++ /dev/null @@ -1,6 +0,0 @@ -echo "Install mise package wrappers" - -rm -f "$HOME/.local/bin/playwright-cli" -omarchy-pkg-drop claude-code github-cli - -source "$OMARCHY_PATH/install/packaging/mise.sh" diff --git a/migrations/1780000000_4_0.sh b/migrations/1780000000_4_0.sh new file mode 100644 index 00000000..6cc4e017 --- /dev/null +++ b/migrations/1780000000_4_0.sh @@ -0,0 +1,24 @@ +echo "Migrate to Omarchy 4.0 package layout" + +# Omarchy 4.0 collapses the old git/online-installer layout into the packaged +# runtime layout. Packages own most static system files; these commands refresh +# the machine-specific and user-specific pieces in place. +channel=$(omarchy-version-channel 2>/dev/null | awk '{print $1}') +case "$channel" in + stable|rc|edge) ;; + *) channel=stable ;; +esac + +# Fold post-4.0 pre-release migration work into the single 4.0 migration. +rm -f "$HOME/.local/bin/playwright-cli" +omarchy-pkg-drop claude-code github-cli + +sudo env \ + OMARCHY_PATH="${OMARCHY_PATH:-/usr/share/omarchy}" \ + OMARCHY_INSTALL="${OMARCHY_INSTALL:-${OMARCHY_PATH:-/usr/share/omarchy}/install}" \ + OMARCHY_INSTALL_USER="$USER" \ + OMARCHY_MIRROR="${OMARCHY_MIRROR:-$channel}" \ + /usr/bin/omarchy-setup-system --install-user "$USER" --upgrade + +OMARCHY_SETUP_CONTEXT=runtime omarchy-setup-user --force +omarchy-refresh-applications diff --git a/system-finalize.sh b/system-finalize.sh deleted file mode 100755 index ab367bfe..00000000 --- a/system-finalize.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash -# -# System-level Omarchy install work. This intentionally runs as root inside -# the target system. User-home setup stays in finalize.sh. - -export OMARCHY_INSTALL_LOG_FILE="${OMARCHY_INSTALL_LOG_FILE:-/var/log/omarchy-install.log}" - -set -eEo pipefail - -_OMARCHY_INSTALLER_DIR=$(dirname "$(realpath "${BASH_SOURCE[0]}")") -export OMARCHY_PATH="${OMARCHY_PATH:-$_OMARCHY_INSTALLER_DIR}" -export OMARCHY_INSTALL="${OMARCHY_INSTALL:-$_OMARCHY_INSTALLER_DIR/install}" -export PATH="${OMARCHY_PATH}/bin:$_OMARCHY_INSTALLER_DIR/bin:$PATH" - -source "$OMARCHY_INSTALL/helpers/mode.sh" -detect_install_mode -export_legacy_mode_flags -source "$OMARCHY_INSTALL/helpers/chroot.sh" -source "$OMARCHY_INSTALL/helpers/logging.sh" - -if (( EUID != 0 )); then - echo "Error: system-finalize.sh must run as root" >&2 - exit 1 -fi - -if [[ -z ${OMARCHY_INSTALL_USER:-} || ${OMARCHY_INSTALL_USER:-} == "root" ]]; then - echo "Error: system-finalize.sh requires OMARCHY_INSTALL_USER to name the target non-root user" >&2 - exit 1 -fi - -if ! getent passwd "$OMARCHY_INSTALL_USER" >/dev/null; then - echo "Error: OMARCHY_INSTALL_USER=$OMARCHY_INSTALL_USER does not exist" >&2 - exit 1 -fi - -source "$OMARCHY_INSTALL/system/all.sh" diff --git a/test/cli b/test/cli index 619e2683..b085866b 100755 --- a/test/cli +++ b/test/cli @@ -135,9 +135,6 @@ assert_output_contains "bare share help uses canonical route" "$output" "omarchy output=$("$CLI" menu share) assert_output_contains "bare required-arg filename route renders CLI help" "$output" "omarchy share [path...]" -output=$("$CLI" branch set) -assert_output_contains "bare required-choice route renders CLI help" "$output" "omarchy branch set " - CLI="$CLI" python3 <<'PY' import json import os diff --git a/test/offline-finalizer-bootstrap-test.sh b/test/offline-finalizer-bootstrap-test.sh deleted file mode 100755 index 972fe188..00000000 --- a/test/offline-finalizer-bootstrap-test.sh +++ /dev/null @@ -1,179 +0,0 @@ -#!/bin/bash -# Ensure the offline/chroot finalizer reaches target-side scripts with no -# controlling tty. This specifically protects against finalize.sh sourcing the -# interactive helper bundle (presentation/errors) before the parent can capture -# a useful failure. -set -euo pipefail - -ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" -TMP="$(mktemp -d)" -trap 'rm -rf "$TMP"' EXIT - -mkdir -p \ - "$TMP/install/helpers" \ - "$TMP/install/packaging" \ - "$TMP/install/user" \ - "$TMP/install/config" \ - "$TMP/install/login" \ - "$TMP/install/post-install" \ - "$TMP/omarchy/applications/icons" \ - "$TMP/omarchy/bin" \ - "$TMP/omarchy/config" \ - "$TMP/omarchy/default/alacritty" \ - "$TMP/omarchy/default/hypr/toggles" \ - "$TMP/omarchy/default/nautilus-python/extensions" \ - "$TMP/omarchy/default/omarchy-skill" \ - "$TMP/omarchy/migrations" \ - "$TMP/home" - -cp "$ROOT/install/helpers/mode.sh" "$TMP/install/helpers/" -cp "$ROOT/install/helpers/chroot.sh" "$TMP/install/helpers/" -cp "$ROOT/install/helpers/logging.sh" "$TMP/install/helpers/" -ln -s "$TMP/install" "$TMP/omarchy/install" - -cat >"$TMP/install/user/all.sh" <<'SCRIPT' -run_logged "$OMARCHY_INSTALL/packaging/marker.sh" -install_mode_is offline -echo user-marker >>"$OMARCHY_INSTALL_LOG_FILE" -stop_install_log -touch "$HOME/finalizer-completed" -SCRIPT - -cat >"$TMP/install/packaging/marker.sh" <<'SCRIPT' -echo packaging-marker -SCRIPT - -for script in icons webapps tuis npm; do - cat >"$TMP/install/packaging/$script.sh" <<'SCRIPT' -: -SCRIPT -done - -cat >"$TMP/install/post-install/finished.sh" <<'SCRIPT' -stop_install_log -touch "$HOME/finalizer-completed" -return 0 2>/dev/null || exit 0 -SCRIPT - -cat >"$TMP/omarchy/default/bashrc" <<'EOF' -# test bashrc -EOF -cat >"$TMP/omarchy/default/alacritty/Alacritty.desktop" <<'EOF' -[Desktop Entry] -Name=Alacritty -Type=Application -Exec=true -EOF -cat >"$TMP/omarchy/default/hypr/toggles/flags.lua" <<'EOF' -return {} -EOF -: >"$TMP/omarchy/default/nautilus-python/extensions/localsend.py" -: >"$TMP/omarchy/default/nautilus-python/extensions/transcode.py" -cat >"$TMP/omarchy/icon.txt" <<'EOF' -icon -EOF -cat >"$TMP/omarchy/logo.txt" <<'EOF' -logo -EOF -cat >"$TMP/omarchy/applications/test.desktop" <<'EOF' -[Desktop Entry] -Name=Test -Type=Application -Exec=true -EOF -: >"$TMP/omarchy/applications/icons/Test.png" - -for cmd in gtk-update-icon-cache update-desktop-database xdg-mime xdg-settings xdg-user-dirs-update; do - cat >"$TMP/omarchy/bin/$cmd" <<'SCRIPT' -#!/bin/bash -: -SCRIPT - chmod +x "$TMP/omarchy/bin/$cmd" -done - -if grep -Eq '^[[:space:]]*(source|\.)[[:space:]].*helpers/all\.sh' "$ROOT/finalize.sh"; then - echo "finalize.sh must not source helpers/all.sh" >&2 - exit 1 -fi - -output="$({ - setsid -w env \ - OMARCHY_INSTALL="$TMP/install" \ - OMARCHY_PATH="$TMP/omarchy" \ - OMARCHY_INSTALL_MODE=offline \ - OMARCHY_CHROOT_FINALIZER=1 \ - OMARCHY_INSTALL_LOG_FILE="$TMP/omarchy-install.log" \ - HOME="$TMP/home" \ - USER=ryan \ - bash "$ROOT/finalize.sh" &1)" - -printf '%s\n' "$output" - -if [[ ! -f "$TMP/home/finalizer-completed" ]]; then - echo "expected finalizer completion marker" >&2 - exit 1 -fi - -if ! grep -q 'packaging-marker' "$TMP/omarchy-install.log"; then - echo "expected run_logged script output in install log" >&2 - exit 1 -fi - -if ! grep -q 'user-marker' "$TMP/omarchy-install.log"; then - echo "expected sourced user scripts to run" >&2 - exit 1 -fi - -if [[ $output == *$'\033[?25h'* ]]; then - echo "offline finalizer leaked cursor escape" >&2 - exit 1 -fi - -if [[ $output == *'Inappropriate ioctl'* || $output == *'/dev/tty'* ]]; then - echo "offline finalizer attempted tty access" >&2 - exit 1 -fi - -rm -f "$TMP/home/finalizer-completed" "$TMP/omarchy-install.log" -debug_output="$({ - setsid -w env \ - OMARCHY_INSTALL_DEBUG=1 \ - OMARCHY_INSTALL="$TMP/install" \ - OMARCHY_PATH="$TMP/omarchy" \ - OMARCHY_INSTALL_MODE=offline \ - OMARCHY_CHROOT_FINALIZER=1 \ - OMARCHY_INSTALL_LOG_FILE="$TMP/omarchy-install.log" \ - HOME="$TMP/home" \ - USER=ryan \ - bash "$ROOT/finalize.sh" &1)" - -printf '%s\n' "$debug_output" - -if [[ ! -f "$TMP/home/finalizer-completed" ]]; then - echo "expected debug finalizer completion marker" >&2 - exit 1 -fi - -if ! grep -q '\[finalize-debug\] tracing enabled' "$TMP/omarchy-install.log"; then - echo "expected finalize debug trace marker in install log" >&2 - exit 1 -fi - -if ! grep -q 'source .*/helpers/mode.sh' "$TMP/omarchy-install.log"; then - echo "expected helper source trace in debug install log" >&2 - exit 1 -fi - -if ! grep -q 'packaging-marker' "$TMP/omarchy-install.log"; then - echo "expected debug run_logged script output in install log" >&2 - exit 1 -fi - -if [[ $debug_output == *'Inappropriate ioctl'* || $debug_output == *'/dev/tty'* ]]; then - echo "debug offline finalizer attempted tty access" >&2 - exit 1 -fi - -echo "offline finalizer bootstrap test passed" diff --git a/test/shell.d/config-test.sh b/test/shell.d/config-test.sh index 853f8dba..31772afa 100755 --- a/test/shell.d/config-test.sh +++ b/test/shell.d/config-test.sh @@ -4,15 +4,8 @@ set -euo pipefail source "$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)/base-test.sh" -TMPDIR="" - export PATH="$ROOT/bin:$PATH" -cleanup() { - [[ -n $TMPDIR && -d $TMPDIR ]] && rm -rf "$TMPDIR" -} -trap cleanup EXIT - require_command jq require_command python3 @@ -94,185 +87,6 @@ if missing or bad: PY pass "default bar widget ids resolve to manifests and entry points" -migration=$(grep -rl 'Place the system update indicator next to weather in the bar' "$ROOT/migrations" | head -n 1 || true) -[[ -n $migration ]] || fail "update placement migration exists" - -TMPDIR=$(mktemp -d) -mkdir -p "$TMPDIR/home/.config/omarchy" - -cat >"$TMPDIR/home/.config/omarchy/shell.json" <<'JSON' -{ - "version": 1, - "bar": { - "layout": { - "left": [{ "id": "omarchy.menu" }, { "id": "omarchy.workspaces" }], - "center": [{ "id": "omarchy.clock" }, { "id": "omarchy.weather" }], - "right": [{ "id": "omarchy.tray" }, { "id": "omarchy.bluetooth" }] - } - }, - "plugins": [] -} -JSON - -HOME="$TMPDIR/home" OMARCHY_PATH="$ROOT" omarchy-config-shell-bar add omarchy.tailscale -jq -e ' - def ids: map(.id // .); - .bar.layout.right | ids == ["omarchy.tray", "omarchy.tailscale", "omarchy.bluetooth"] -' "$TMPDIR/home/.config/omarchy/shell.json" >/dev/null -pass "shell config appends widgets to right by default" - -HOME="$TMPDIR/home" OMARCHY_PATH="$ROOT" omarchy-config-shell-bar add local.left left -jq -e ' - def ids: map(.id // .); - .bar.layout.left | ids == ["omarchy.menu", "omarchy.workspaces", "local.left"] -' "$TMPDIR/home/.config/omarchy/shell.json" >/dev/null -pass "shell config appends left widgets after workspaces" - -HOME="$TMPDIR/home" OMARCHY_PATH="$ROOT" omarchy-config-shell-bar add local.center center -jq -e ' - def ids: map(.id // .); - .bar.layout.center | ids == ["omarchy.clock", "omarchy.weather", "local.center"] -' "$TMPDIR/home/.config/omarchy/shell.json" >/dev/null -pass "shell config appends center widgets after weather" - -HOME="$TMPDIR/home" OMARCHY_PATH="$ROOT" omarchy-config-shell-bar add local.first right -jq -e ' - def ids: map(.id // .); - .bar.layout.right | ids == ["omarchy.tray", "local.first", "omarchy.tailscale", "omarchy.bluetooth"] -' "$TMPDIR/home/.config/omarchy/shell.json" >/dev/null -pass "shell config moves existing widgets without duplicates" - -HOME="$TMPDIR/home" OMARCHY_PATH="$ROOT" omarchy-config-shell-bar show | jq -e ' - def ids: map(.id // .); - (.layout.right | ids == ["omarchy.tray", "local.first", "omarchy.tailscale", "omarchy.bluetooth"]) and - has("version") | not -' >/dev/null -pass "shell config shows only bar json" - -HOME="$TMPDIR/home" OMARCHY_PATH="$ROOT" omarchy-config-shell-bar list --json | jq -e ' - any(.[]; .id == "omarchy.system-stats" and .addable == true and .inBar == false) and - all(.[]; .id != "omarchy.tailscale") -' >/dev/null -pass "shell config lists addable bar widgets" - -HOME="$TMPDIR/home" OMARCHY_PATH="$ROOT" omarchy-config-shell-bar list --json --all | jq -e ' - any(.[]; .id == "omarchy.tailscale" and .inBar == true and .addable == false) and - any(.[]; .id == "omarchy.indicators" and .addable == true) -' >/dev/null -pass "shell config list --all includes current widget status" - -HOME="$TMPDIR/home" OMARCHY_PATH="$ROOT" omarchy-config-shell-bar position bottom -jq -e ' - .bar.position == "bottom" and - .plugins == [] -' "$TMPDIR/home/.config/omarchy/shell.json" >/dev/null -pass "shell config sets bar position" - -HOME="$TMPDIR/home" OMARCHY_PATH="$ROOT" omarchy-config-shell-bar transparent true -jq -e ' - .bar.transparent == true and - .bar.position == "bottom" and - .plugins == [] -' "$TMPDIR/home/.config/omarchy/shell.json" >/dev/null -pass "shell config sets bar transparency" - -HOME="$TMPDIR/home" OMARCHY_PATH="$ROOT" omarchy-config-shell-bar drop local.left -jq -e ' - def ids: map(.id // .); - (.bar.layout.left | ids == ["omarchy.menu", "omarchy.workspaces"]) and - (.bar.layout.center | ids == ["omarchy.clock", "omarchy.weather", "local.center"]) and - (.bar.layout.right | ids == ["omarchy.tray", "local.first", "omarchy.tailscale", "omarchy.bluetooth"]) -' "$TMPDIR/home/.config/omarchy/shell.json" >/dev/null -pass "shell config drops widgets from any section" - -HOME="$TMPDIR/home" OMARCHY_PATH="$ROOT" omarchy-config-shell-bar remove local.center -jq -e ' - def ids: map(.id // .); - .bar.layout.center | ids == ["omarchy.clock", "omarchy.weather"] -' "$TMPDIR/home/.config/omarchy/shell.json" >/dev/null -pass "shell config removes widgets with remove alias" - -cat >"$TMPDIR/home/.config/omarchy/shell.json" <<'JSON' -{ - "version": 1, - "bar": { - "position": "top", - "transparent": false, - "centerAnchor": "omarchy.clock", - "layout": { - "left": [{ "id": "omarchy.menu" }], - "center": [ - { "id": "omarchy.clock", "format": "HH:mm" }, - { "id": "omarchy.weather", "refreshMinutes": 30 }, - { "id": "omarchy.indicators", "items": ["Dnd", "NightLight"] }, - { "id": "omarchy.system-update", "custom": true } - ], - "right": [{ "id": "omarchy.audio" }] - } - }, - "plugins": [{ "id": "custom.plugin", "enabled": true }] -} -JSON - -HOME="$TMPDIR/home" bash "$migration" - -jq -e ' - def ids: map(.id // .); - .bar.layout.center | ids == [ - "omarchy.clock", - "omarchy.weather", - "omarchy.system-update", - "omarchy.indicators" - ] -' "$TMPDIR/home/.config/omarchy/shell.json" >/dev/null -pass "update placement migration moves update after weather" - -jq -e ' - .bar.layout.center[1].refreshMinutes == 30 and - .bar.layout.center[2].custom == true and - .bar.layout.center[3].items == ["Dnd", "NightLight"] and - .plugins == [{ "id": "custom.plugin", "enabled": true }] -' "$TMPDIR/home/.config/omarchy/shell.json" >/dev/null -pass "update placement migration preserves unrelated settings" - -before=$(sha256sum "$TMPDIR/home/.config/omarchy/shell.json" | awk '{print $1}') -HOME="$TMPDIR/home" bash "$migration" -after=$(sha256sum "$TMPDIR/home/.config/omarchy/shell.json" | awk '{print $1}') -[[ $before == "$after" ]] || fail "update placement migration is idempotent" -pass "update placement migration is idempotent" - -clock_migration=$(grep -rl 'Remove leading zero from bar clock date' "$ROOT/migrations" | head -n 1 || true) -[[ -n $clock_migration ]] || fail "clock date format migration exists" - -cat >"$TMPDIR/home/.config/omarchy/shell.json" <<'JSON' -{ - "version": 1, - "bar": { - "layout": { - "left": [], - "center": [ - { "id": "omarchy.clock", "formatAlt": "dd MMMM 'W'ww yyyy" }, - { "id": "omarchy.weather" } - ], - "right": [ - { "id": "local.clock", "formatAlt": "dd MMMM 'W'ww yyyy" } - ] - } - }, - "plugins": [] -} -JSON - -HOME="$TMPDIR/home" bash "$clock_migration" - -jq -e ' - .bar.layout.center[0].formatAlt == "d MMMM \u0027W\u0027ww yyyy" and - .bar.layout.right[0].formatAlt == "dd MMMM \u0027W\u0027ww yyyy" -' "$TMPDIR/home/.config/omarchy/shell.json" >/dev/null -pass "clock date format migration removes leading zero from clock" - -before=$(sha256sum "$TMPDIR/home/.config/omarchy/shell.json" | awk '{print $1}') -HOME="$TMPDIR/home" bash "$clock_migration" -after=$(sha256sum "$TMPDIR/home/.config/omarchy/shell.json" | awk '{print $1}') -[[ $before == "$after" ]] || fail "clock date format migration is idempotent" -pass "clock date format migration is idempotent" +mapfile -t migrations < <(find "$ROOT/migrations" -maxdepth 1 -type f -name '*.sh' -printf '%f\n' | sort) +[[ ${#migrations[@]} -eq 1 && ${migrations[0]} == "1780000000_4_0.sh" ]] || fail "historical migrations are collapsed" +pass "historical migrations are collapsed into the 4.0 migration" diff --git a/test/shell.d/runtime-smoke-test.sh b/test/shell.d/runtime-smoke-test.sh index 0b9515b8..cb84b6a5 100755 --- a/test/shell.d/runtime-smoke-test.sh +++ b/test/shell.d/runtime-smoke-test.sh @@ -13,6 +13,7 @@ cleanup() { wait "$QS_PID" 2>/dev/null || true fi [[ -n $TMPDIR && -d $TMPDIR ]] && rm -rf "$TMPDIR" + return 0 } trap cleanup EXIT