Skip to content

Commit 584d703

Browse files
committed
Update check-battery.ps1
1 parent 4c3327b commit 584d703

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Scripts/check-battery.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
This PowerShell script queries the status of the system battery and prints it.
66
.EXAMPLE
77
PS> ./check-battery
8-
Battery 9% low, 54 min remaining
8+
⚠️ Battery 9% low, 54 min remaining
99
.LINK
1010
https://github.com/fleschutz/PowerShell
1111
.NOTES
@@ -33,10 +33,10 @@ try {
3333
$Reply = "⚠️ Battery at $Percent%, ONLY $Remaining MIN remaining"
3434
} elseif ($Remaining -le 30) {
3535
$Reply = "⚠️ Battery at $Percent%, only $Remaining min remaining"
36+
} elseif ($Percent -lt 10) {
37+
$Reply = "⚠️ Battery $Percent% low, $Remaining min remaining"
3638
} elseif ($Percent -ge 80) {
3739
$Reply = "✅ Battery $Percent% full, $Remaining min remaining"
38-
} elseif ($Percent -le 10) {
39-
$Reply = "✅ Battery $Percent% low, $Remaining min remaining"
4040
} else {
4141
$Reply = "✅ Battery at $Percent%, $Remaining min remaining"
4242
}

0 commit comments

Comments
 (0)