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
What's New
Version 1.0
First release
What it does
27 actions-
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
View as code
Every action of this Shortcut written out as Cherri, a programming language for Shortcuts. Great for learning how it works.
#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)
}
}
Open in Cherri Playground
Decompiled with cherri 2.3.0 (GPL-2.0). May need small fixes before it compiles.
Ratings & Reviews
Write a Review–
out of 5
★★★★★
★★★★
★★★
★★
★
0 ratings
No reviews yet. Be the first to share what you think!
Advertisement
More by shortgram
You Might Also Like
Advertisement