forked from netkv/nanofetch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnanofetch
29 lines (24 loc) · 865 Bytes
/
nanofetch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/sh
exec 2>/dev/null
prin() {
printf "\033[10%sm \033[4%sm \033[0m :| %-6s | %s\n" "$1" "$1" "$2" "$3"
}
if [ -f /bedrock/etc/bedrock-release ]; then
distro=$(brl version)
prin 1 distro "$distro"
elif [ -f /etc/os-release ]; then
. /etc/os-release
prin 1 distro "$NAME"
else
prin 1 os "$(uname -o)"
fi
prin 2 kernel "$(uname -r) $(systemctl --version | head -1)"
prin 3 device "$(uname -n) $(uname -m)"
read -r dev < /sys/devices/virtual/dmi/id/product_name
prin 4 host "$dev"
prin 5 shell "${SHELL##*/}"
id=$(xprop -root -notype | awk '$1=="_NET_SUPPORTING_WM_CHECK:"{print $5}');
prin 6 wm "$(xprop -id "${id}" -notype -f _NET_WM_NAME 8t | grep "_NET_WM_NAME = " \
| cut -d' ' -f3 | cut -d\" -f2)"
prin 7 gtk "$(grep gtk-theme-name "${XDG_CONFIG_HOME:-$HOME/.config}/gtk-3.0/settings.ini" | cut -d= -f2 )"
prin 0 bins "$(find /usr/bin | wc -l)"