ShareShortcuts
Fork “Battery Mode”

Built something new on top of this Shortcut? Share it as a fork: it becomes a Shortcut of your own, which you manage, and both pages link to each other so awesomeusername gets credit.

  1. 1Get the Shortcut and change it in the Shortcuts app. Give it a name of its own.
  2. 2Share it from the Shortcuts app and copy the iCloud link.
  3. 3Come back here, paste the link and describe what is different, e.g. “Added a step that uses Apple Intelligence to personalise the text.”
Downloads
41K
Saved
1
Actions
63
Category
Utilities
Version
1.0
Language
EN

Battery

What's New

Version 1.0

First release

Version History
1.0 Jun 11, 2022

First release

What it does

63 actions
  1. Comment
    Battery Mode 1.0 2018-10-10 Created by ♥️⚡️ -@ashangt
  2. Get Battery Level
  3. If
  4. Text
  5. Set Variable
    Rec
  6. If
  7. If
  8. Text
  9. Set Variable
    Rec
  10. If
  11. Text
  12. Set Variable
    Rec
  13. Choose from Menu
    Battery Level: …% Recommended Mode: …
  14. Choose from Menu
    Normal
  15. Set Low Power Mode
  16. Set Brightness
  17. Set Airplane Mode
  18. Set Wi-Fi
  19. Set Cellular Data
  20. Set Bluetooth
  21. Choose from Menu
    Normal Wifi Only
  22. Set Low Power Mode
  23. Set Brightness
  24. Set Airplane Mode
  25. Set Wi-Fi
  26. Set Cellular Data
  27. Set Bluetooth
  28. Choose from Menu
    Low with Wifi
  29. Set Low Power Mode
  30. Set Brightness
  31. Set Airplane Mode
  32. Set Wi-Fi
  33. Set Cellular Data
  34. Set Bluetooth
  35. Choose from Menu
    Low with Cellular
  36. Set Low Power Mode
  37. Set Brightness
  38. Set Airplane Mode
  39. Set Wi-Fi
  40. Set Cellular Data
  41. Set Bluetooth
  42. Choose from Menu
    Ultra Low
  43. Set Low Power Mode
  44. Set Brightness
  45. Set Airplane Mode
  46. Set Wi-Fi
  47. Set Cellular Data
  48. Set Bluetooth
  49. Play/Pause
  50. Choose from Menu
    Charging
  51. Set Brightness
  52. Set Airplane Mode
  53. Set Wi-Fi
  54. Set Cellular Data
  55. Set Bluetooth
  56. Choose from Menu
    Charging & DND
  57. Show Notification
    Battery Mode will enable Do Not Disturb until you manually turn it off.
  58. Set Brightness
  59. Set Airplane Mode
  60. Set Wi-Fi
  61. Set Cellular Data
  62. Set Bluetooth
  63. Set Focus

View as code
Beta

Every action of this Shortcut written out as Cherri, a programming language for Shortcuts. Great for learning how it works.

#include 'actions/music'
#define mac false
#include 'actions/device'
#define color green
#define glyph battery

/*
Battery Mode 1.0
2018-10-10 Created by ♥️⚡️
-@ashangt
*/
const BatteryLevel = getBatteryLevel()

if BatteryLevel > 49 {
	@Rec = "Normal"
} else {
	if BatteryLevel < 18 {
		@Rec = "Ultra Low"
	} else {
		@Rec = "Low"
	}
}

menu "Battery Level: {BatteryLevel}%   Recommended Mode: {@Rec}" {
item "Normal":
	setLowPowerMode(false)
	setBrightness(0.9154589)
	setAirplaneMode(false)
	setWifi(false)
	setCellularData(false)
	setBluetooth(false)
item "Normal Wifi Only":
	setLowPowerMode(false)
	setBrightness(0.90821254)
	setAirplaneMode(false)
	setWifi(false)
	setCellularData(false)
	setBluetooth(false)
item "Low with Wifi":
	setLowPowerMode(false)
	setBrightness(0.38164252)
	setAirplaneMode(false)
	setWifi(true)
	setCellularData(false)
	setBluetooth(false)
item "Low with Cellular":
	setLowPowerMode(false)
	setBrightness(0.38164252)
	setAirplaneMode(false)
	setWifi(false)
	setCellularData(true)
	setBluetooth(false)
item "Ultra Low":
	setLowPowerMode(false)
	setBrightness(0)
	setAirplaneMode(false)
	setWifi(false)
	setCellularData(false)
	setBluetooth(false)
	togglePlayPause()
item "Charging":
	setBrightness(0)
	setAirplaneMode(false)
	setWifi(false)
	setCellularData(false)
	setBluetooth(false)
item "Charging & DND":
	showNotification("Battery Mode will enable Do Not Disturb until you manually turn it off.", "Battery Mode", false, IfResult)
	setBrightness(0)
	setAirplaneMode(false)
	setWifi(true)
	setCellularData(false)
	setBluetooth(false)
	setFocusMode()
}
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 awesomeusername

See All

You Might Also Like

See All
Advertisement