all repos

dotfiles @ e3fa73c

i use rach linux btw

dotfiles/bin/catfetch (view raw)

1
#!/bin/sh
2
3
# Kernel version
4
kernel=$(cat /proc/sys/kernel/osrelease | cut -d '-' -f1)
5
6
# Window manager
7
[ ! "$wm" ] && [ "$DISPLAY" ] && command -v xprop >/dev/null && {
8
    wmname="$(xprop -id $(xprop -root -notype\
9
    | awk '$1=="_NET_SUPPORTING_WM_CHECK:"{print $5}') -notype -f _NET_WM_NAME 8t\
10
    | grep "WM_NAME"\
11
    | cut -f2 -d \")"
12
}
13
14
# Shell
15
shell=$(basename $SHELL)
16
17
# Installed packages
18
manager=$(which apt pacman yay 2>/dev/null)
19
manager=${manager##*/}
20
case "$manager" in
21
    apt) packages="$(dpkg-query -f '${binary:Package}\n' -W | wc -l)" ;;
22
    yay) packages="$(yay -Q | wc -l)" ;;
23
    pacman) packages="$(pacman -Q | wc -l)" ;;
24
esac
25
26
# Text decorations
27
bold=$(tput bold)
28
reset="\e[0m"
29
blue="\e[36m"
30
31
echo -e "            ${blue}${bold}    WM ${reset}${wmname}"
32
echo -e "   /\_/\    ${blue}${bold} SHELL ${reset}${shell}"
33
echo -e "  (=^.^=)   ${blue}${bold}KERNEL ${reset}${kernel}"
34
echo -e "  (\") (\")_/ ${blue}${bold}   PKG ${reset}${packages}"