From 267af23efc9c3cc3beb0db6c658bc1146a4bf701 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Wed, 24 Jun 2026 13:31:17 +0200 Subject: [PATCH] Make Battle.net launcher installer-only --- bin/omarchy-install-gaming-battlenet | 2 +- .../applications}/battlenet.desktop | 0 docs/file-layout.md | 3 +++ test/shell.d/battlenet-test.sh | 14 ++++++++++++++ 4 files changed, 18 insertions(+), 1 deletion(-) rename {applications => default/applications}/battlenet.desktop (100%) create mode 100644 test/shell.d/battlenet-test.sh diff --git a/bin/omarchy-install-gaming-battlenet b/bin/omarchy-install-gaming-battlenet index 5df49955..1bb4ddcd 100755 --- a/bin/omarchy-install-gaming-battlenet +++ b/bin/omarchy-install-gaming-battlenet @@ -64,7 +64,7 @@ EOF fi mkdir -p "$HOME/.local/share/applications" -install -m 644 "$OMARCHY_PATH/applications/battlenet.desktop" \ +install -m 644 "$OMARCHY_PATH/default/applications/battlenet.desktop" \ "$HOME/.local/share/applications/battlenet.desktop" update-desktop-database "$HOME/.local/share/applications" 2>/dev/null || true diff --git a/applications/battlenet.desktop b/default/applications/battlenet.desktop similarity index 100% rename from applications/battlenet.desktop rename to default/applications/battlenet.desktop diff --git a/docs/file-layout.md b/docs/file-layout.md index d886d55a..04488f1b 100644 --- a/docs/file-layout.md +++ b/docs/file-layout.md @@ -75,6 +75,9 @@ etc/fastfetch/config.jsonc ──► omarchy-settings /etc/fastfetch/con applications/*.desktop ──► omarchy-settings /etc/skel/.local/share/applications/ /usr/share/omarchy/applications/ +default/applications/battlenet.desktop + ──► omarchy-settings /usr/share/omarchy/default/applications/ + (installer-only launcher template) applications/icons/* ──► omarchy-settings /usr/share/icons/hicolor/{48,256,scalable}/apps/ etc/** ──► omarchy-settings /etc/** (drop-ins we own outright) diff --git a/test/shell.d/battlenet-test.sh b/test/shell.d/battlenet-test.sh new file mode 100644 index 00000000..dcaa03fe --- /dev/null +++ b/test/shell.d/battlenet-test.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +set -euo pipefail + +source "$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)/base-test.sh" + +install_script="$ROOT/bin/omarchy-install-gaming-battlenet" + +[[ ! -f $ROOT/applications/battlenet.desktop ]] || fail "Battle.net launcher is not part of default application refresh" +[[ -f $ROOT/default/applications/battlenet.desktop ]] || fail "Battle.net launcher template is available to the installer" +grep -F '$OMARCHY_PATH/default/applications/battlenet.desktop' "$install_script" >/dev/null || + fail "Battle.net installer installs the launcher from the installer-only template" + +pass "Battle.net launcher is only installed by the Battle.net installer"