fix bat pct and cpu overheating; add vim line numbers and cli themes to
Some checks failed
Activate Homelab Configuration / rebuild (push) Failing after 2m18s
Some checks failed
Activate Homelab Configuration / rebuild (push) Failing after 2m18s
default
This commit is contained in:
parent
9e5f99b718
commit
16bba9d9f3
5 changed files with 4 additions and 3 deletions
|
|
@ -17,7 +17,7 @@
|
|||
BAT_PCT=`${pkgs.acpi}/bin/acpi -b | ${pkgs.gnugrep}/bin/grep -P -o '[0-9]+(?=%)'`
|
||||
BAT_STA=`${pkgs.acpi}/bin/acpi -b | ${pkgs.gnugrep}/bin/grep -P -o '\w+(?=,)'`
|
||||
echo "`date` battery status:$BAT_STA percentage:$BAT_PCT"
|
||||
test $BAT_PCT -le 30 && test $BAT_PCT -gt 15 && test $BAT_STA = "Discharging" && DISPLAY=:0.0 ${pkgs.libnotify}/bin/notify-send -c device -u normal "Low Battery" "\$\{BAT_PCT}% remaining."
|
||||
test $BAT_PCT -le 30 && test $BAT_PCT -gt 15 && test $BAT_STA = "Discharging" && DISPLAY=:0.0 ${pkgs.libnotify}/bin/notify-send -c device -u normal "Low Battery" "Battery remaining: $BAT_PCT%."
|
||||
test $BAT_PCT -le 15 && test $BAT_STA = "Discharging" && DISPLAY=:0.0 ${pkgs.libnotify}/bin/notify-send -c device -u critical "Low Battery" "Shutdown at 10%."
|
||||
''} > /tmp/cron.batt.log 2>&1"
|
||||
];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue