From 5657a91f8ddbcc8ff9b9add0396456a71b1d1ed9 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sun, 4 Oct 2026 08:23:00 -0400 Subject: [PATCH] Drop Lazydocker from new installs (#14230) * Drop Lazydocker from new installs * Preserve Lazydocker during Quattro upgrades * Remove Lazydocker from the manual --- bin/omarchy-install-preinstalls | 1 - bin/omarchy-remove-preinstalls | 1 - bin/omarchy-upgrade-to-quattro | 14 +++++- .../applications}/Docker.desktop | 0 default/hypr/bindings/applications.lua | 4 +- docs/file-layout.md | 4 +- install/omarchy-base.packages | 1 - manual/07-hotkeys.md | 1 - manual/18-development-tools.md | 4 +- manual/21-tuis.md | 8 ---- migrations/1787580187.sh | 2 +- test/shell.d/docker-group-migration-test.sh | 4 +- test/shell.d/hyprland-default-config-test.sh | 16 +++++++ test/shell.d/upgrade-to-quattro-test.sh | 43 +++++++++++++++++++ 14 files changed, 80 insertions(+), 23 deletions(-) rename {applications => default/applications}/Docker.desktop (100%) diff --git a/bin/omarchy-install-preinstalls b/bin/omarchy-install-preinstalls index c60b5b34..bb10dd10 100755 --- a/bin/omarchy-install-preinstalls +++ b/bin/omarchy-install-preinstalls @@ -21,7 +21,6 @@ if gum confirm "Are you sure you want to restore all preinstalled web apps, TUI obs-studio \ kdenlive \ moonlight-qt \ - lazydocker \ omacut \ monologue \ omacalc \ diff --git a/bin/omarchy-remove-preinstalls b/bin/omarchy-remove-preinstalls index 1efba06e..611121d7 100755 --- a/bin/omarchy-remove-preinstalls +++ b/bin/omarchy-remove-preinstalls @@ -40,7 +40,6 @@ if gum confirm "Are you sure you want to remove all preinstalled web apps, TUI w obs-studio \ kdenlive \ moonlight-qt \ - lazydocker \ omacut \ monologue \ omacalc \ diff --git a/bin/omarchy-upgrade-to-quattro b/bin/omarchy-upgrade-to-quattro index d6b25f5b..9f4a8ae7 100755 --- a/bin/omarchy-upgrade-to-quattro +++ b/bin/omarchy-upgrade-to-quattro @@ -733,7 +733,6 @@ remove_conflicting_legacy_packages() { # after NetworkManager and the rest of the new stack are installed. local conflicting_packages=( asdcontrol-git - lazydocker-bin localsend-bin omarchy-chromium omarchy-lazyvim @@ -768,6 +767,17 @@ migrate_1password_beta_package() { fi } +migrate_lazydocker_package() { + if package_installed_exact lazydocker-bin; then + log "Replacing existing Lazydocker with the repo package" + if as_root pacman -S --needed --noconfirm --ask 4 lazydocker; then + mark_packages_explicit lazydocker + else + warn "Could not replace lazydocker-bin; leaving existing Lazydocker installed." + fi + fi +} + install_omarchy_quattro_packages() { local omarchy_package=omarchy local settings_package=omarchy-settings @@ -874,7 +884,6 @@ remove_retired_default_packages() { hyprlock impala iwd - lazydocker-bin lmstudio lmstudio-bin localsend-bin @@ -2419,6 +2428,7 @@ verify_kernel_cmdline_root configure_snapper_policy configure_lock_authentication migrate_1password_beta_package +migrate_lazydocker_package cleanup_legacy_user_paths apply_system_transition apply_user_transition diff --git a/applications/Docker.desktop b/default/applications/Docker.desktop similarity index 100% rename from applications/Docker.desktop rename to default/applications/Docker.desktop diff --git a/default/hypr/bindings/applications.lua b/default/hypr/bindings/applications.lua index e4428a9f..a8c547e0 100644 --- a/default/hypr/bindings/applications.lua +++ b/default/hypr/bindings/applications.lua @@ -13,7 +13,9 @@ if o.preinstalled_bindings_enabled() then o.bind("SUPER + CTRL + RETURN", "Herdr", { omarchy = "terminal-herdr" }) o.bind("SUPER + SHIFT + M", "Music", { omarchy = "spotify" }) o.bind("SUPER + SHIFT + ALT + M", "Music TUI", { tui = "cliamp", focus = true }) - o.bind("SUPER + SHIFT + D", "Docker", { tui = "omarchy-launch-docker-tui" }) + if o.cmd_present("lazydocker") then + o.bind("SUPER + SHIFT + D", "Docker", { tui = "omarchy-launch-docker-tui" }) + end o.bind("SUPER + SHIFT + G", "Signal", { omarchy = "signal" }) o.bind("SUPER + SHIFT + O", "Obsidian", { launch = "obsidian", focus = "^obsidian$" }) o.bind("SUPER + SHIFT + W", "Omawrite", { launch = "omawrite" }) diff --git a/docs/file-layout.md b/docs/file-layout.md index 73c48c4f..dfb50cfb 100644 --- a/docs/file-layout.md +++ b/docs/file-layout.md @@ -88,9 +88,9 @@ etc/xdg/kitty/kitty.conf ──► omarchy-settings /etc/xdg/kitty/kit applications/*.desktop ──► omarchy-settings /etc/skel/.local/share/applications/ /usr/share/omarchy/applications/ -default/applications/battlenet.desktop +default/applications/*.desktop ──► omarchy-settings /usr/share/omarchy/default/applications/ - (installer-only launcher template) + (optional and legacy launcher templates) applications/icons/* ──► omarchy-settings /usr/share/icons/hicolor/{48,256,scalable}/apps/ etc/** ──► omarchy-settings /etc/** (drop-ins we own outright) diff --git a/install/omarchy-base.packages b/install/omarchy-base.packages index a64af07c..bc1fdf09 100644 --- a/install/omarchy-base.packages +++ b/install/omarchy-base.packages @@ -67,7 +67,6 @@ networkmanager jq kdenlive kernel-modules-hook -lazydocker lazygit less libsecret diff --git a/manual/07-hotkeys.md b/manual/07-hotkeys.md index 660b191c..5431c8fc 100644 --- a/manual/07-hotkeys.md +++ b/manual/07-hotkeys.md @@ -118,7 +118,6 @@ You can see all the main keyboard bindings with `Super + K` (Tmux bindings with | `Super + Shift + S` | Google Maps | | `Super + Shift + Alt + G` | Messenger (WhatsApp) | | `Super + Shift + Ctrl + G` | Messenger (Google) | -| `Super + Shift + D` | Docker (LazyDocker) | | `Super + Shift + O` | Obsidian | | `Super + Shift + W` | Writing (Omawrite) | | `Super + Shift + X` | X | diff --git a/manual/18-development-tools.md b/manual/18-development-tools.md index f49125d9..8d6fbfc6 100644 --- a/manual/18-development-tools.md +++ b/manual/18-development-tools.md @@ -22,9 +22,7 @@ To install, say, Ruby, you'd run `mise use -g ruby`, which will both install Rub [Docker](https://www.docker.com/) hardly needs any introduction. It allows you to run isolated containers, and Omarchy installs everything needed to run it well, including Docker itself and [Docker Compose](https://docs.docker.com/compose/). -By default your user is *not* in the `docker` group. That group is effectively passwordless root — anything in it can `docker run -v /:/host` and take over the machine — so a single rogue script or dependency running as you would otherwise be one command away from root. So on the command line you run Docker with `sudo` (`sudo docker ps`, `sudo docker compose up`), and the graphical tools that talk to the daemon — the Docker TUI on `Super + Shift + D` and the Windows VM — ask for authorization when they need it. If you want the convenience of a groupless setup back and understand the tradeoff, enable it from **Setup > Security > Sudoless Docker** (or run `omarchy-setup-security-sudoless-docker`), which adds you to the `docker` group after a warning; then plain `docker` and the `d` alias work without `sudo` again. - -Remember to checkout the Lazydocker command to manage your containers in a cool TUI using `Super + Shift + D`; it asks for authorization the first time unless you have enabled sudoless Docker. +By default your user is *not* in the `docker` group. That group is effectively passwordless root — anything in it can `docker run -v /:/host` and take over the machine — so a single rogue script or dependency running as you would otherwise be one command away from root. So on the command line you run Docker with `sudo` (`sudo docker ps`, `sudo docker compose up`), and the graphical tools that talk to the daemon — the Windows VM — ask for authorization when they need it. If you want the convenience of a groupless setup back and understand the tradeoff, enable it from **Setup > Security > Sudoless Docker** (or run `omarchy-setup-security-sudoless-docker`), which adds you to the `docker` group after a warning; then plain `docker` and the `d` alias work without `sudo` again. You can setup the common databases for local development in Docker using _Install > Development > Docker DB_ in the Omarchy menu. diff --git a/manual/21-tuis.md b/manual/21-tuis.md index 5e923324..c8e88646 100644 --- a/manual/21-tuis.md +++ b/manual/21-tuis.md @@ -8,14 +8,6 @@ You can run it directly, by going to any directory managed by git and running `l You hop between the different panes using `Tab`. In the Files pane, you select files for staging using `Space`, and then you can create a new commit using `c`. You can see all the commands available using `?`. -## Lazydocker - -[Lazydocker](https://github.com/jesseduffield/lazydocker) is made in the same spirit like Lazygit, and also gives you a terminal interface for managing your containers and images. - -You can start it with `Super + Shift + D`. - -You stop a container using `s` or start/restart it using `r`. See all commands using `?`. - ## Btop [Btop](https://github.com/aristocratos/btop) is a beautiful resource manager that shows memory, CPU, disk, and network usage. It also lists all active processes, and allows you to manage them. diff --git a/migrations/1787580187.sh b/migrations/1787580187.sh index cf07cc66..1e2697f3 100644 --- a/migrations/1787580187.sh +++ b/migrations/1787580187.sh @@ -18,5 +18,5 @@ fi # (or runs directly under sudoless Docker). Refresh just that file. dest="$HOME/.local/share/applications/Docker.desktop" if [[ -f $dest ]]; then - cp "$OMARCHY_PATH/applications/Docker.desktop" "$dest" + cp "$OMARCHY_PATH/default/applications/Docker.desktop" "$dest" fi diff --git a/test/shell.d/docker-group-migration-test.sh b/test/shell.d/docker-group-migration-test.sh index d382f88f..4777ef63 100644 --- a/test/shell.d/docker-group-migration-test.sh +++ b/test/shell.d/docker-group-migration-test.sh @@ -20,9 +20,9 @@ trap 'rm -rf "$test_dir"' EXIT home="$test_dir/home" omarchy_path="$test_dir/omarchy" stub_bin="$test_dir/bin" -mkdir -p "$home/.local/share/applications" "$omarchy_path/applications" "$stub_bin" +mkdir -p "$home/.local/share/applications" "$omarchy_path/default/applications" "$stub_bin" -printf 'NEW-LAUNCHER\n' >"$omarchy_path/applications/Docker.desktop" +printf 'NEW-LAUNCHER\n' >"$omarchy_path/default/applications/Docker.desktop" printf 'OLD-LAUNCHER\n' >"$home/.local/share/applications/Docker.desktop" # id reports a controllable group set; sudo just drops the prefix; gpasswd diff --git a/test/shell.d/hyprland-default-config-test.sh b/test/shell.d/hyprland-default-config-test.sh index e35baba7..f50e5761 100644 --- a/test/shell.d/hyprland-default-config-test.sh +++ b/test/shell.d/hyprland-default-config-test.sh @@ -175,6 +175,22 @@ if grep -Fq $'SUPER + CTRL + X Toggle dictation' <<<"$missing_voxtype_output"; t fi pass "missing Voxtype skips dictation bindings" +# Lazydocker is optional on new installs, while existing installs keep the hotkey. +lazydocker_bin="$tmpdir/lazydocker-bin" +mkdir -p "$lazydocker_bin" +touch "$lazydocker_bin/lazydocker" +chmod +x "$lazydocker_bin/lazydocker" +lazydocker_output=$(PATH="$lazydocker_bin:$PATH" run_application_bindings "$fresh_home") +grep -Fqx $'SUPER + SHIFT + D\tDocker' <<<"$lazydocker_output" || + fail "installed Lazydocker keeps its Docker shortcut" +pass "installed Lazydocker keeps its Docker shortcut" + +missing_lazydocker_output=$(PATH="$missing_bin" run_application_bindings "$fresh_home") +if grep -Fq $'SUPER + SHIFT + D\tDocker' <<<"$missing_lazydocker_output"; then + fail "missing Lazydocker skips its Docker shortcut" +fi +pass "missing Lazydocker skips its Docker shortcut" + # The Grave shortcuts are aliases, so the original SUPER + S pair has to keep # working alongside them. scratchpad_home="$tmpdir/scratchpad-home" diff --git a/test/shell.d/upgrade-to-quattro-test.sh b/test/shell.d/upgrade-to-quattro-test.sh index 5cf95d3b..9c9a6431 100644 --- a/test/shell.d/upgrade-to-quattro-test.sh +++ b/test/shell.d/upgrade-to-quattro-test.sh @@ -363,3 +363,46 @@ reboot_line=$(grep -n 'Rebooting because --reboot was passed' "$upgrade_to_quatt [[ -n $unsafe_line && -n $reboot_line ]] || fail "reboot gate and reboot branch exist" (( unsafe_line < reboot_line )) || fail "an unverified kernel cmdline blocks the reboot" pass "Omarchy 4 upgrade verifies the UKIs and refuses to reboot unverified" + +# Lazydocker is optional on fresh installs, but a pre-quattro install keeps it. +lazydocker_body=$(function_body migrate_lazydocker_package) +[[ -n $lazydocker_body ]] || fail "upgrade has a Lazydocker replacement step" +eval "migrate_lazydocker_package() { $lazydocker_body; }" +lazydocker_calls="" +package_installed_exact() { [[ $1 == "lazydocker-bin" && $legacy_lazydocker == "yes" ]]; } +log() { :; } +warn() { :; } +as_root() { + lazydocker_calls+="swap:$*"$'\n' + return "$lazydocker_swap_status" +} +mark_packages_explicit() { lazydocker_calls+="explicit:$*"$'\n'; } + +legacy_lazydocker=no +lazydocker_swap_status=0 +migrate_lazydocker_package +[[ -z $lazydocker_calls ]] || fail "upgrade does not install Lazydocker for users without the legacy package" +pass "upgrade does not install Lazydocker for users without the legacy package" + +legacy_lazydocker=yes +migrate_lazydocker_package +grep -Fxq 'swap:pacman -S --needed --noconfirm --ask 4 lazydocker' <<<"$lazydocker_calls" || + fail "upgrade replaces existing lazydocker-bin with lazydocker" +grep -Fxq 'explicit:lazydocker' <<<"$lazydocker_calls" || fail "upgrade retains Lazydocker as an explicit package" +pass "upgrade replaces existing lazydocker-bin with lazydocker and keeps it explicit" + +lazydocker_calls="" +lazydocker_swap_status=1 +migrate_lazydocker_package +if grep -Fq 'explicit:' <<<"$lazydocker_calls"; then + fail "failed Lazydocker replacement does not mark an absent package explicit" +fi +for cleanup in remove_conflicting_legacy_packages remove_retired_default_packages; do + if grep -qw lazydocker-bin <<<"$(function_body "$cleanup")"; then + fail "upgrade cleanup must not remove existing Lazydocker when replacement fails" + fi +done +pass "upgrade cleanup preserves existing Lazydocker when replacement fails" + +grep -Fxq migrate_lazydocker_package "$upgrade_to_quattro" || fail "upgrade invokes the Lazydocker replacement step" +pass "upgrade invokes the Lazydocker replacement step"