aboutsummaryrefslogtreecommitdiffstats
path: root/config/hypr/scripts/fastfetch-wrapper.sh
blob: ad5f7873ba6717c87134faa8aa6488add74b7729 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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"
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage