]> git.armaanb.net Git - bin.git/blob - ufetch
fix uptime
[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 host="$(hostname)"
6 os='Debian unstable'
7 kernel="$(uname -sr)"
8 uptime="$(uptime -p | cut -d ',' -f 1-2 | tail -c +4)"
9 shell="zsh"
10 ui="KDE Plasma"
11
12 ## DEFINE COLORS
13 bold='\033[1m'
14 # black='\033[0;30m'
15 # red='\033[0;31m'
16 # green='\033[0;32m'
17 # yellow='\033[0;33m'
18 # blue='\033[0;34m'
19 # magenta='\033[0;35m'
20 # cyan='\033[0;36m'
21 white='\033[0;37m'
22 reset='\033[0m'
23
24 # you can change these
25 lc="${reset}${bold}${white}"         # labels
26 nc="${reset}${bold}${white}"         # user and hostname
27 ic="${reset}"                        # info
28
29 ## OUTPUT
30 printf "${nc}${USER}${ic}@${nc}${host}${reset}
31 ${lc}OS        ${ic}${os}${reset}
32 ${lc}KERNEL    ${ic}${kernel}${reset}
33 ${lc}UPTIME    ${ic}${uptime}${reset}
34 ${lc}SHELL     ${ic}${shell}${reset}
35 ${lc}DE        ${ic}${ui}${reset}"