mirror of
https://github.com/CoolnsX/hyprdots.git
synced 2025-12-20 07:15:23 +05:30
18 lines
890 B
Bash
Executable File
18 lines
890 B
Bash
Executable File
#!/bin/sh
|
||
|
||
i=1
|
||
while [ $i -le "5" ];do
|
||
mem=$(sed -nE 's_.*MemAvailable:[[:space:]]*(.*) kB_\1_p' /proc/meminfo)
|
||
mem=$(((7919488 - mem)/1000))
|
||
temp=$(cat /sys/class/thermal/thermal_zone0/temp)
|
||
temp=$((temp / 1000))
|
||
bat_stats=$(cat /sys/class/power_supply/BAT*/status)
|
||
vol_stats=$(pamixer --get-mute)
|
||
[ "$bat_stats" = "Discharging" ] && bat_icon=🔋 || bat_icon=🔌
|
||
[ "$vol_stats" = "true" ] && vol_icon=🔇 || vol_icon=🔊
|
||
notify-send "<------------(STATS)------------>" "🧠 CPU usage : $(top -ibn1 | sed -nE 's_%Cpu\(s\):(.*)us.*_\1_p' | cut -d' ' -f2-3) %\n🌡️ Cpu Temp : $temp °C\n🔳 RAM : $mem MB / 7733 MB\n$bat_icon Battery : $(cat /sys/class/power_supply/BAT*/capacity) (${bat_stats})\n☀️ Brightness : $(light -G | cut -d'.' -f1)%\n$vol_icon Volume : $(pamixer --get-volume-human)" -r 2 -t 1500 &
|
||
: $((i+=1))
|
||
sleep 1
|
||
done
|
||
|