Update fastfetch

This commit is contained in:
MacRimi 2025-07-22 19:03:41 +02:00
parent 850e45b9a5
commit 416dd52a30
2 changed files with 9 additions and 1 deletions

View File

@ -2788,16 +2788,23 @@ configure_fastfetch() {
msg_ok "$(translate "Fastfetch configuration updated")"
sed -i '/fastfetch/d' ~/.bashrc ~/.profile /etc/profile
sed -i '/fastfetch/d' ~/.bashrc ~/.profile /etc/profile 2>/dev/null
rm -f /etc/update-motd.d/99-fastfetch
if ! grep -q '# BEGIN FASTFETCH' ~/.bashrc; then
cat << 'EOF' >> ~/.bashrc
# BEGIN FASTFETCH
# Run Fastfetch only in interactive sessions
if [[ $- == *i* ]] && command -v fastfetch &>/dev/null; then
clear
fastfetch
fi
# END FASTFETCH
EOF
fi
msg_ok "$(translate "Fastfetch will start automatically in the console")"
msg_success "$(translate "Fastfetch installation and configuration completed")"

View File

@ -59,6 +59,7 @@ uninstall_fastfetch() {
rm -rf "$HOME/.config/fastfetch"
rm -rf /usr/local/share/fastfetch
sed -i '/fastfetch/d' "$HOME/.bashrc" "$HOME/.profile" /etc/profile 2>/dev/null
sed -i '/# BEGIN FASTFETCH/,/# END FASTFETCH/d' "$HOME/.bashrc"
rm -f /etc/profile.d/fastfetch.sh /etc/update-motd.d/99-fastfetch
dpkg -r fastfetch &>/dev/null