]> git.armaanb.net Git - bin.git/blob - ufetch
d5075ff74d10d8bfcb25a55489645206221ab0c3
[bin.git] / ufetch
1 #!/bin/sh
2 # ufetch-armaan. My customized version of ufetch that doesn't print the ascii art, and doesn't spend time looking things up like the DE. Full credit goes to jschx (Joe Schillinger), the author of ufetch. <https://gitlab.com/jschx/ufetch>
3
4 ## INFO
5
6 # user is already defined
7 host="frost.bhojwani.org"
8 os='Debian unstable'
9 kernel="$(uname -sr)"
10 uptime="$(uptime | awk -F, '{sub(".*up ",x,$1);print $1}' | sed -e 's/^[ \t]*//')"
11 packages="$(dpkg -l | grep -c ^i)"
12 shell="zsh"
13 ui="KDE Plasma"
14
15 ## DEFINE COLORS
16 bold='\033[1m'
17 # black='\033[0;30m'
18 # red='\033[0;31m'
19 # green='\033[0;32m'
20 # yellow='\033[0;33m'
21 # blue='\033[0;34m'
22 # magenta='\033[0;35m'
23 # cyan='\033[0;36m'
24 white='\033[0;37m'
25 reset='\033[0m'
26
27 # you can change these
28 lc="${reset}${bold}${white}"         # labels
29 nc="${reset}${bold}${white}"         # user and hostname
30 ic="${reset}"                       # info
31
32 ## OUTPUT
33
34 printf "${nc}${USER}${ic}@${nc}${host}${reset}
35 ${lc}OS        ${ic}${os}${reset}
36 ${lc}KERNEL    ${ic}${kernel}${reset}
37 ${lc}UPTIME    ${ic}${uptime}${reset}
38 ${lc}PACKAGES  ${ic}${packages}${reset}
39 ${lc}SHELL     ${ic}${shell}${reset}
40 ${lc}DE        ${ic}${ui}${reset}"