Ricing Terminal Prompt

Ricing Terminal Prompt

 My terminal prompt is riced to show all the essential information at a glance: disk usage, battery level, CPU temperature, memory usage, available updates, machine model, current directory, active terminal emulator, time, uptime, number of logged‑in users, and load average.

# --- your additions at the bottom of ~/.bashrc ---

# Kill starship

PROMPT_COMMAND=""


# Custom prompt

_temp_c() { echo "$(( $(cat /sys/class/thermal/thermal_zone0/temp) / 1000 ))°C"; }   

_mem() { free -h | awk '/^Mem/{print $3"/"$2}'; }

_bat() { local c=$(cat /sys/class/power_supply/BAT*/capacity 2>/dev/null); [[ -n $c ]] && echo "${c}%"; }


PS1='╭─ $(df -h / | tail -n 1 | tr -s " " | cut -d" " -f5) ─────󰂅 $(_bat) ───── $( _temp_c ) ─────󰍛 $( _mem ) ─────󰚰 $(checkupdates 2>/dev/null | wc -l) ──╮\n├─────󰌽 $(uname -o) ───── $(pwd) ───── $(whatterm)\n├──── $(uptime)\n╰──── '