-
Notifications
You must be signed in to change notification settings - Fork 0
/
ChargeThresholdUI.bat
70 lines (56 loc) · 1.28 KB
/
ChargeThresholdUI.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
@echo off
:main
cls
echo.
echo.
echo =====================================
echo ChargeThreshold Easier UI
echo.
echo 1.-Status =^> Shows current
echo configuration if any.
echo 2.-Set up =^> Set up and enable
echo threshold.
echo 3.-Disable =^> Disables threshold.
echo.
echo 4.-Leave
echo -Jir
echo =====================================
echo.
Choice /C 1234 /N /M "[Command Number?]:"
if errorlevel 4 (
goto end
) else if errorlevel 3 (
goto disable
) else if errorlevel 2 (
goto setup
) else if errorlevel 1 (
goto status
)
goto :eof
:status
ChargeThreshold status
pause>nul
goto main
:setup
echo Set up: Input the battery percentage to stop charging
echo then, input the percentage to restart charging,
echo second field is optional.
echo.
set /p max=[Percentage to stop]:
set /p min=[Percentage to recharge]:
echo.
if [%min%]==[] (
ChargeThreshold on %max%
) else (
ChargeThreshold on %max% %min%
)
pause>nul
goto main
:disable
ChargeThreshold off
pause>nul
goto main
:end
echo.
echo See ya ^<3 &pause>nul
goto :eof