diff options
author | davidpkj <davidpenkow1@gmail.com> | 2024-07-24 16:37:37 +0200 |
---|---|---|
committer | davidpkj <davidpenkow1@gmail.com> | 2024-07-24 16:37:37 +0200 |
commit | a33954c59fe9d8fe889fab077b6612cc029ac3fc (patch) | |
tree | a3035512625aefe79b0973f91bdc7c7ebe302cea /scripts/.local/bin/personal/syshealth | |
parent | cbfd64346441200e3df8df6ad54fc76c99d25f1c (diff) |
Mega Update: FW16 Space Rice
- Add symlinks to dotfiles in config dir (links to links)
- Switch from neofetch to fastfetch
- Add htop
- Add dynamic colors (polybar, xmonad, qutebrowser)
- Update color management (pywal & friends, alacritty, xorg)
- Minor updates to other files (quality of life)
Diffstat (limited to 'scripts/.local/bin/personal/syshealth')
-rwxr-xr-x | scripts/.local/bin/personal/syshealth | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/scripts/.local/bin/personal/syshealth b/scripts/.local/bin/personal/syshealth index 5c7ebe5..6320056 100755 --- a/scripts/.local/bin/personal/syshealth +++ b/scripts/.local/bin/personal/syshealth @@ -5,8 +5,10 @@ export XDG_RUNTIME_DIR="/run/user/$(id -u)" export DISPLAY=":0" +NOTIFIER="/usr/bin/notify-send -u critical " +# NOTIFIER="/usr/local/bin/herbe " + acpi_report="$(acpi | grep -v unavailable | head -n 1)" -sensors_report="$(sensors | grep "Package id 0:")" # Battery charge check local_percent="$(echo $acpi_report | awk '{print $4}')" @@ -15,25 +17,12 @@ local_time="$(echo $acpi_report | awk '{print $5}')" battery_message=("Warning:" "Battery VOLTAGE critical") temperature_message=("Warning:" "Core TEMPERATURE critical") + $NOTIFIER "${battery_message[0]} ${battery_message[1]}" & if ((${local_percent::-2} <= 15)); then if [[ "${local_state::-1}" == "Discharging" ]]; then - /usr/bin/notify-send -u critical " ${battery_message[0]} ${battery_message[1]}" & - # espeak "${battery_message[0]}${battery_message[1]}" - fi -elif ((${local_percent::-2} >= 90)); then - if [[ "${local_state::-1}" == "Charging" ]]; then - /usr/bin/notify-send -u critical " ${battery_message[0]} ${battery_message[1]}" & + $NOTIFIER " ${battery_message[0]} ${battery_message[1]}" & # espeak "${battery_message[0]}${battery_message[1]}" fi fi -# Core temperature check -local_temp="$(echo $sensors_report | awk '{print $4}' | sed 's/+//g')" -local_temp_high="$(echo $sensors_report | awk '{print $7}' | sed 's/+//g')" - -if ((${local_temp::-4} >= 90)); then - /usr/bin/notify-send -u critical " ${temperature_message[0]} ${temperature_message[1]}" & - # espeak "${temperature_message[0]}${temperature_message[1]}" -fi - |