all repos

dotfiles @ 102aa36798f17adf2eaac48c399ea8643d503ac4

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 name
7
[ ! "$wm" ] && [ "$DISPLAY" ] && command -v xprop >/dev/null && {
8
    wmname="$(xprop -id $(xprop -root -notype | awk '$1=="_NET_SUPPORTING_WM_CHECK:"{print $5}') -notype -f _NET_WM_NAME 8t | grep "WM_NAME" | cut -f2 -d \")"
9
}
10
11
# Shell
12
shell=$(basename $SHELL)
13
14
# Packages
15
manager=$(which apt pacman yay apk xbps-query 2>/dev/null)
16
manager=${manager##*/}
17
case "$manager" in
18
	apt)        packages="$(dpkg-query -f '${binary:Package}\n' -W | wc -l)";;
19
	pacman)     packages="$(pacman -Q | wc -l)";;
20
	yay)        packages="$(yay -Q | wc -l)";;
21
	apk)        packages="$(apk list --installed | wc -l)";;
22
	xbps-query) packages="$(xbps-query -l | wc -l)";;
23
esac 
24
25
26
# Colors ####
27
bold="\e[1m"
28
reset="\e[0m"
29
30
blue="\e[36m"
31
grey="\e[90m"
32
black='\e[30m'
33
red='\e[31m'
34
green='\e[32m'
35
yellow='\e[33m'
36
blue='\e[34m'
37
magenta='\e[35m'
38
cyan='\e[36m'
39
white='\e[37m'
40
41
echo -e "            ${blue}${bold}    WM ${reset}${wmname}"
42
echo -e "   /\_/\    ${blue}${bold} SHELL ${reset}${shell}"
43
echo -e "  (=^.^=)   ${blue}${bold}KERNEL ${reset}${kernel}"
44
echo -e "  (\") (\")_/ ${blue}${bold}   PKG ${reset}${packages}"
45
echo -e "  ${black} ${red} ${green} ${yellow} ${blue} ${magenta} ${cyan} ${reset} "
46
exit 0