diff options
| author | Pinapelz <yukais@pinapelz.com> | 2026-03-30 21:58:55 -0700 |
|---|---|---|
| committer | Pinapelz <yukais@pinapelz.com> | 2026-03-30 21:58:55 -0700 |
| commit | 4acf85db722ebe7e019e7427436083b3b9f4959e (patch) | |
| tree | 6d5b416ad605730a6d573d1b4178c7676dc8a015 /config/hypr/scripts/fastfetch-wrapper.sh | |
| parent | 89e10cd0c0331fc727889d41e34309db1fb5735f (diff) | |
| parent | e4b9059d346e6a6dbd6216cd1fb5e41085bb6e7b (diff) | |
Merge remote-tracking branch 'upstream/main'
Diffstat (limited to 'config/hypr/scripts/fastfetch-wrapper.sh')
| -rwxr-xr-x | config/hypr/scripts/fastfetch-wrapper.sh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/config/hypr/scripts/fastfetch-wrapper.sh b/config/hypr/scripts/fastfetch-wrapper.sh new file mode 100755 index 00000000..ad5f7873 --- /dev/null +++ b/config/hypr/scripts/fastfetch-wrapper.sh @@ -0,0 +1,24 @@ +#!/usr/bin/env bash + +# 1. Get the specific ID and the "ID_LIKE" family +source /etc/os-release +SPECIFIC_ID=$ID +FAMILY_ID=$ID_LIKE + +# 2. Define your asset directory +ASSET_DIR="$HOME/.config/fastfetch/images" + +# 3. Selection Logic +if [ -f "$ASSET_DIR/$SPECIFIC_ID.png" ]; then + # Use exact match if available (e.g., soplos.png) + SELECTED_LOGO="$ASSET_DIR/$SPECIFIC_ID.png" +elif [ -n "$FAMILY_ID" ] && [ -f "$ASSET_DIR/${FAMILY_ID%% *}.png" ]; then + # Fallback to family (e.g., debian.png) - takes the first word of ID_LIKE + SELECTED_LOGO="$ASSET_DIR/${FAMILY_ID%% *}.png" +else + # Let fastfetch handle it natively if no custom image found + fastfetch + exit 0 +fi + +fastfetch --kitty "$SELECTED_LOGO" |
