Do not hardcode Linux distro

This commit is contained in:
Hans Goor 2024-09-01 21:18:23 +02:00
parent 78d1980b37
commit 413f560583
Signed by: eyedevelop
SSH key fingerprint: SHA256:Td89veptDEwCV8J3fjqnknNk7SbwzedYhauyC2nFBYg
2 changed files with 5 additions and 3 deletions

View file

@ -1,3 +1,3 @@
if status --is-interactive
fastfetch -c ~/.config/fastfetch.json
if status --is-interactive; and test -f /etc/os-release
fastfetch --logo (grep -Ee '^ID=' /etc/os-release | sed 's,ID="\(.*\)-.*",\1,g') -c ~/.config/fastfetch.json
end

View file

@ -1,3 +1,5 @@
#!/bin/bash
[[ -n "$PS1" ]] && fastfetch -c ~/.config/fastfetch.json
[[ -n "$PS1" ]] && [[ -f /etc/os-release ]] && \
fastfetch --logo "$(grep -Ee '^ID=' /etc/os-release | sed 's,ID="\(.*\)-.*",\1,g')" -c ~/.config/fastfetch.json