summaryrefslogtreecommitdiff
path: root/releng/airootfs/etc/profile.d/raveos-fastfetch.sh
diff options
context:
space:
mode:
authornippy <you@example.com>2026-04-12 18:11:38 +0200
committernippy <you@example.com>2026-04-12 18:11:38 +0200
commit89d442a74ab0b3fc49f838c15f3f722f1be74720 (patch)
tree97c021670032230f020c2b45e6cd2aabd3dc1a00 /releng/airootfs/etc/profile.d/raveos-fastfetch.sh
parent71d4e0832da17f0ba97b7a5db86c6bf45be4e894 (diff)
downloadRaveOS-build-iso-89d442a74ab0b3fc49f838c15f3f722f1be74720.tar.gz
RaveOS-build-iso-89d442a74ab0b3fc49f838c15f3f722f1be74720.zip
live
Diffstat (limited to 'releng/airootfs/etc/profile.d/raveos-fastfetch.sh')
-rw-r--r--releng/airootfs/etc/profile.d/raveos-fastfetch.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/releng/airootfs/etc/profile.d/raveos-fastfetch.sh b/releng/airootfs/etc/profile.d/raveos-fastfetch.sh
new file mode 100644
index 0000000..c97dc67
--- /dev/null
+++ b/releng/airootfs/etc/profile.d/raveos-fastfetch.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+# RaveOS terminal greeting
+# Guard: prevent double execution (login shell profile.d + .bashrc)
+[[ -n "$_RAVEOS_GREETING_DONE" ]] && return 2>/dev/null
+_RAVEOS_GREETING_DONE=1
+
+if command -v fastfetch &>/dev/null; then
+ if [[ "$TERM" == "xterm-kitty" ]]; then
+ _rows=$(tput lines 2>/dev/null || echo 40)
+ _logo_h=$(( _rows * 40 / 100 ))
+ (( _logo_h < 8 )) && _logo_h=8
+ (( _logo_h > 24 )) && _logo_h=24
+ fastfetch --config ~/.config/fastfetch/config-kitty.jsonc --logo-height "$_logo_h"
+ unset _rows _logo_h
+ else
+ fastfetch
+ fi
+fi