#!/usr/bin/env fish # Outputs colored text function color set_color $argv[1] for i in $argv[2..-1] echo -n $i end set_color normal end set cpu_model (awk '/model name/ {print $6; exit}' /proc/cpuinfo) set cpu_freq (awk '{printf("%.2fHz", $0/1e6)}' /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq) set cpu_temp (awk '{printf("%dK", $0/1e3+273.15)}' /sys/class/thermal/thermal_zone3/temp) set gpu_model (lspci | awk -F [][] '/VGA/ {print $4}') set mem_used (awk '/Active/ {printf("%.1f", $2/1e6); exit}' /proc/meminfo) set mem_tot (awk '/MemTotal/ {printf("%.1f", $2/1e6); exit}' /proc/meminfo) set uptime (awk '{printf("%d:%02d:%02d",($1/60/60/24),($1/60/60%24),($1/60%60))}' /proc/uptime) set kernel (uname -sr) set os (awk -F= '/^NAME/ {print $2}' /etc/os-release) set screen (xrandr | grep \* | awk '{print $1}') set shell (basename $SHELL) echo -n \33c echo (color blue OS:) $os GNU+$kernel echo (color blue CPU:) $cpu_model $cpu_freq [$cpu_temp] echo (color blue GPU:) $gpu_model echo (color blue RAM:) $mem_used/$mem_tot GB echo (color blue Screen:) $screen echo (color blue Uptime:) $uptime echo (color blue WM:) bspwm echo (color blue Shell:) $shell echo (color blue Font:) gohufont echo