File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 5
5
This PowerShell script queries the status of the system battery and prints it.
6
6
. EXAMPLE
7
7
PS> ./check-battery
8
- ✅ Battery 9% low, 54 min remaining
8
+ ⚠️ Battery 9% low, 54 min remaining
9
9
. LINK
10
10
https://github.com/fleschutz/PowerShell
11
11
. NOTES
@@ -33,10 +33,10 @@ try {
33
33
$Reply = " ⚠️ Battery at $Percent %, ONLY $Remaining MIN remaining"
34
34
} elseif ($Remaining -le 30 ) {
35
35
$Reply = " ⚠️ Battery at $Percent %, only $Remaining min remaining"
36
+ } elseif ($Percent -lt 10 ) {
37
+ $Reply = " ⚠️ Battery $Percent % low, $Remaining min remaining"
36
38
} elseif ($Percent -ge 80 ) {
37
39
$Reply = " ✅ Battery $Percent % full, $Remaining min remaining"
38
- } elseif ($Percent -le 10 ) {
39
- $Reply = " ✅ Battery $Percent % low, $Remaining min remaining"
40
40
} else {
41
41
$Reply = " ✅ Battery at $Percent %, $Remaining min remaining"
42
42
}
You can’t perform that action at this time.
0 commit comments