Internal
Battery
Level
Optimization
System
This is my go at a PowerSaver # I don’t suggest using this shortcut if you have iPadOS 15 or newer because the newer OS has it’s own low power mode
Что нового
Версия 1.0
First release
Что делает
Действий: 27-
CommentThis gets the device model
-
Get Device Details
-
Set VariableDeviceModel
-
CommentThis gets the device battery level
-
Get Battery Level
-
Set VariableBatteryLevel
-
CommentYes or No if your device is charging
-
Battery Statuscom.alexhay.ToolboxProForShortcuts
-
Set VariableBatteryStatus
-
If
-
If
-
Show NotificationPlug in your device soon!
-
CommentIf your device is iPhone it will just run low power mode
-
If
-
Set Low Power Mode
-
If
-
CommentIf your device is anything but iPhone it will turn Bluetooth off, turn of Wi-Fi, Turn reduce motion on, set brightness to 10%
-
Set Bluetooth
-
Set Wi-Fi
-
CommentTurning reduce motion on might help or not To get to reduce motion go to: Setting -> Accessibility -> Motion (This is on iPad mini)
-
Toggle Reduce Motioncom.apple.AccessibilityUtilities.AXSettingsShortcuts
-
Set Brightness
-
If
-
Set Bluetooth
-
Set Wi-Fi
-
Toggle Reduce Motioncom.apple.AccessibilityUtilities.AXSettingsShortcuts
-
Set Brightness
Посмотреть как код
Все действия этой команды, записанные на Cherri — языке программирования для приложения «Быстрые команды». Отлично подходит, чтобы разобраться, как она работает.
#define mac false
#include 'actions/device'
#define glyph battery
// This gets the device model
getDeviceDetail("Device Model")
@DeviceModel
// This gets the device battery level
getBatteryLevel()
@BatteryLevel
// Yes or No if your device is charging
rawAction("com.alexhay.ToolboxProForShortcuts.BatteryStatusIntent", {
"batteryState": "isCharging"
})
@BatteryStatus
if @BatteryStatus contains "Yes" {
if @BatteryLevel <= 20 {
showNotification("Plug in your device soon!", @BatteryLevel)
// If your device is iPhone it will just run low power mode
if @DeviceModel contains "iPhone" {
setLowPowerMode(false)
} else {
// If your device is anything but iPhone it will turn Bluetooth off, turn of Wi-Fi, Turn reduce motion on, set brightness to 10%
setBluetooth(0)
setWifi(0)
/*
Turning reduce motion on might help or not
To get to reduce motion go to:
Setting -> Accessibility -> Motion
(This is on iPad mini)
*/
setReduceMotion(1)
setBrightness(0.10381356)
}
} else {
setBluetooth(false)
setWifi(false)
toggleReduceMotion()
setBrightness(nil)
}
}
Открыть в Cherri Playground
Декомпилировано с помощью cherri 2.3.0 (GPL-2.0). Перед компиляцией могут понадобиться небольшие исправления.
Оценки и отзывы
Написать отзыв–
из 5
★★★★★
★★★★
★★★
★★
★
0 ratings
Пока нет отзывов. Поделись мнением первым!
Реклама
Ещё от shortgram
Вам также может понравиться
Реклама