diff options
| author | twells46 <173561638+twells46@users.noreply.github.com> | 2025-12-31 13:28:05 -0600 |
|---|---|---|
| committer | twells46 <173561638+twells46@users.noreply.github.com> | 2025-12-31 13:28:05 -0600 |
| commit | 2140ab51deed88e90eafebf9520fa5f9995dc7c9 (patch) | |
| tree | 03cf1dcd2900495c1efb79aaa85f3254ecd5fb87 /private_dot_local/bin/executable_status.sh | |
| parent | ff8f50638e4b17a9d7cc88d2f0d9560b7effce39 (diff) | |
Migrate from stow
Diffstat (limited to 'private_dot_local/bin/executable_status.sh')
| -rw-r--r-- | private_dot_local/bin/executable_status.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/private_dot_local/bin/executable_status.sh b/private_dot_local/bin/executable_status.sh new file mode 100644 index 0000000..edbb015 --- /dev/null +++ b/private_dot_local/bin/executable_status.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +#VOL="$(wpctl get-volume @DEFAULT_SINK@ | awk '{print $2}')" +VOL="$(wpctl get-volume @DEFAULT_SINK@)" +VOL="${VOL#* }" +#VOL="${VOL% *}" + +DATE=$(date +"%a %b %d %I:%M %p") + +MEM="$(free -m | awk '/^Mem/{print $3}') MiB" + +#CPU_LOAD="CPU: $(awk '{print $1}' /proc/loadavg)" +read -r CPU_LOAD < /proc/loadavg +CPU_LOAD="${CPU_LOAD%% *}" + +read -r CPU_TEMP < /sys/class/thermal/thermal_zone0/temp +CPU_TEMP="$(($CPU_TEMP/1000))" + +#BAT="$(cat /sys/class/power_supply/BAT1/capacity)%" +read -r BAT < /sys/class/power_supply/BAT1/capacity + +echo "$VOL | $CPU_LOAD | ${CPU_TEMP} C | $MEM | $BAT% | $DATE" |