termux-tools: Add termux-wake-{lock,unlock}
This commit is contained in:
parent
33b944c8a2
commit
b956895de8
13
packages/termux-tools/termux-wake-lock
Executable file
13
packages/termux-tools/termux-wake-lock
Executable file
@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ $# != 0 ]; then
|
||||
echo 'usage: termux-wake-lock'
|
||||
echo 'Acquire the Termux wake lock to prevent the CPU from sleeping.'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
am startservice \
|
||||
--user 0 \
|
||||
-a com.termux.service_wake_lock \
|
||||
com.termux/com.termux.app.TermuxService \
|
||||
> /dev/null
|
13
packages/termux-tools/termux-wake-unlock
Executable file
13
packages/termux-tools/termux-wake-unlock
Executable file
@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ $# != 0 ]; then
|
||||
echo 'usage: termux-wake-unlock'
|
||||
echo 'Release the Termux wake lock to allow the CPU to sleep.'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
am startservice \
|
||||
--user 0 \
|
||||
-a com.termux.service_wake_unlock \
|
||||
com.termux/com.termux.app.TermuxService \
|
||||
> /dev/null
|
Loading…
Reference in New Issue
Block a user