Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions guest/scripts/materialize-omarchy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,14 @@ install_file 0644 "$source_dir/etc/profile.d/omarchy.sh" "$root/etc/profile.d/om
install_file 0644 "$source_dir/etc/fastfetch/config.jsonc" "$root/etc/fastfetch/config.jsonc"

# Preserve the application metadata and artwork used by Quickshell's real app
# provider. A single scalable hicolor location works for these demo assets.
# provider. Normalize display-style artwork names to the lowercase, hyphenated
# icon identifiers used by the desktop files and accepted by GTK's icon cache.
mkdir -p "$root/usr/share/icons/hicolor/256x256/apps"
while IFS= read -r icon; do
install_file 0644 "$icon" "$root/usr/share/icons/hicolor/256x256/apps/$(basename "$icon")"
icon_name=$(basename "$icon" | LC_ALL=C tr '[:upper:] ' '[:lower:]-')
icon_target="$root/usr/share/icons/hicolor/256x256/apps/$icon_name"
[[ ! -e $icon_target ]] || fail "normalized icon name collides: $icon_name"
install_file 0644 "$icon" "$icon_target"
done < <(find "$source_dir/applications/icons" -maxdepth 1 -type f | sort)
install_file 0644 "$source_dir/icon.png" "$root/usr/share/pixmaps/omarchy.png"
install_file 0644 "$source_dir/icon.png" "$root/usr/share/icons/hicolor/256x256/apps/omarchy.png"
Expand Down
48 changes: 48 additions & 0 deletions guest/tests/verify.py
Original file line number Diff line number Diff line change
Expand Up @@ -1106,6 +1106,54 @@ def main() -> None:
"fresh-user background sorting selects the Try Omarchy wallpaper by default",
)

with tempfile.TemporaryDirectory() as temporary:
staged_root = Path(temporary) / "root"
subprocess.run(
[
"bash",
str(GUEST / "scripts/materialize-omarchy.sh"),
"--root",
str(staged_root),
"--source",
str(source),
"--spec",
str(GUEST / "spec.json"),
],
check=True,
text=True,
capture_output=True,
)
staged_icons = staged_root / "usr/share/icons/hicolor/256x256/apps"
icon_names = {path.name for path in staged_icons.iterdir() if path.is_file()}
expected_normalized_icons = {
"disk-usage.png",
"google-contacts.png",
"google-maps.png",
"google-messages.png",
"google-photos.png",
"retro-gaming.png",
}
check(
expected_normalized_icons <= icon_names
and not {
"Disk Usage.png",
"Google Contacts.png",
"Google Maps.png",
"Google Messages.png",
"Google Photos.png",
"Retro Gaming.png",
}
& icon_names,
"materialized application icons match their desktop icon names",
)
check(
all(
all(0x21 <= byte <= 0x7E for byte in os.fsencode(path.name))
for path in staged_icons.iterdir()
),
"materialized application icon paths are GTK cache-safe",
)

subprocess.run(
[
"python3",
Expand Down