ShareShortcuts

Extend Battery

mapl
„Extend Battery“ forken

Hast du auf Basis dieses Kurzbefehls etwas Neues erstellt? Teile ihn als Fork: Er wird zu deinem eigenen Kurzbefehl, den du selbst verwaltest, und beide Seiten verlinken aufeinander, damit mapl die Anerkennung erhält.

  1. 1Lade den Kurzbefehl und ändere ihn in der Kurzbefehle-App. Gib ihm einen eigenen Namen.
  2. 2Teile ihn in der Kurzbefehle-App und kopiere den iCloud-Link.
  3. 3Komm hierher zurück, füge den Link ein und beschreibe, was sich geändert hat, z. B. „Einen Schritt hinzugefügt, der Apple Intelligence nutzt, um den Text zu personalisieren.“
Downloads
9K
Gesichert
0
Aktionen
109
Kategorie
Utilities
Version
1.4
Sprache
EN

Vorschau

This shortcut uses all the techniques I’m aware of to reduce battery usage as much as possible in a customizable way.

There are a couple iOS settings configurations you may optionally make before using this shortcut.

1. For the optional experimental feature named, Enable Green Color Filter, configure your iOS color filter settings so that, when turned on, only green pixels in the image of the crayons can be seen. Your configuration should look like the included screenshot. The reason for this is that green OLED pixels use less energy than red and blue. I’m not sure yet however if this makes a measurable difference. I plan to do some well controlled testing of this soon. (Settings > Accessibility > Display & Text Size > Color Filters)

2. Create a new Focus mode that uses solid black wallpapers. This reduces the number of OLED pixels that are turned on.

Each time you run this shortcut, you can select which iOS features you want to turn off.

  • WiFi
  • Cellular Data
  • Bluetooth
  • Airdrop
  • Only use LTE
  • Enable Focus Mode
  • Reduce backlight
  • Dark Mode
  • Reduce Transparency
  • **Disable Auto Brightness!**
  • Disable True Tone
  • Disable Night Shift
  • Reduce Transparency
  • Enable White Point
  • Reduce Motion
  • Low Power Mode
  • Enable Green Color Filter (Experimental)

You can also run this shortcut inside Automations. Like the included screenshot, just set the action of the automation to run a Shortcut and choose this one. For the input passed to the shortcut, you can pass either “Hands Free Enable” or “Off” (without quotes). Or, if you want to run this shortcut easily with Siri/one button enable, just say, “Siri, Extend Battery”. Then at the first prompt, you can say/tap “Hands Free Enable”. This will determine if your Wi-Fi is in use and, if not, disable it. The other battery saving techniques will then also be turned on. This option will not disable bluetooth however, in case you are driving and using CarPlay.

If you know of any other techniques to reduce battery usage, put them in the comments! Or if you encounter any bugs or have any suggestions at all, let me know too!

I originally published this shortcut on the iOS Shortcuty app. This shortcut contains a short section at the beginning that uses the Shortcuty API to check for updates. You can safely delete these actions in the shortcut if you don’t want them.

Neue Funktionen

Version 1.4

UTC - Fixed problem where Siri asks for a specified cellular plan when using Hands Free Enable

Versionsverlauf
1.4 24. Dez 2025

UTC - Fixed problem where Siri asks for a specified cellular plan when using Hands Free Enable

1.0 20. Dez 2025

First release

Was er macht

109 Aktionen
  1. Comment
    First, check if this shortcut was run from an Automation that passed an action word input to it.
  2. Text
  3. Set Variable
    Action
  4. If
  5. Set Variable
    Action
  6. Comment
    Update checking actions. Note that update checks will only run if the device is connected to WiFi and if the shortcut was not run from an Automation.
  7. Text
  8. Set Variable
    Version
  9. Get Network Details
  10. If
  11. Get Contents of URL
    https://shortcuty.app/api/shortcuts/d47dfe35-9e99-40c4-81d7-ac5a24d04d51/version
  12. If
  13. Comment
    If version published on Shortcuty is greater than the version on your local device, start update actions.
  14. Choose from Menu
    An update for Extend Battery is available! Do you want to open the download/release notes page now? [ … -> … ]
  15. Choose from Menu
    Yes
  16. Comment
    Open Shortcuty page of the new updated shortcut.
  17. Open URLs
  18. Stop This Shortcut
  19. Choose from Menu
    No, just run Extend Battery
  20. Choose from Menu
    Remind me in 1 hour and continue
  21. Date
  22. Adjust Date
  23. Add New Reminder
  24. Show Alert
  25. Comment
    This Shortcut includes a feature that lets you choose whether or not to enable a Focus mode each time it is run. Please type the name of your preferred Focus mode to associate with this shortcut. Note that capitalization and spelling must match exac…
  26. Text
  27. Comment
    Start of this shortcut’s main actions.
  28. Text
  29. Text
  30. Text
  31. If
  32. Choose from Menu
    Turn On or Off?
  33. Choose from Menu
    Hands Free Enable
  34. Set Variable
    Action
  35. Choose from Menu
    On
  36. Set Variable
    Action
  37. Choose from Menu
    Off
  38. Set Variable
    Action
  39. If
  40. If
  41. Comment
    Enable Extend Battery with an Automation, with one tap, or if the shortcut was run with Siri, with one voice response.
  42. Get Network Details
  43. If
  44. Set Wi-Fi
  45. Set AirDrop
  46. Set Low Power Mode
  47. Set Appearance
  48. Set True Tone
  49. Set Night Shift
  50. Toggle Reduce Transparency
    com.apple.AccessibilityUtilities.AXSettingsShortcuts
  51. Toggle Reduce Motion
    com.apple.AccessibilityUtilities.AXSettingsShortcuts
  52. Accessibility Auto Brightness Enabled Entity Updatable Entity
    com.apple.AccessibilityUIServer
  53. Toggle White Point
    com.apple.AccessibilityUtilities.AXSettingsShortcuts
  54. Set Brightness
  55. Set Focus
  56. If
  57. If
  58. Comment
    List of available options to enable/disable.
  59. List
  60. Choose from List
  61. If
  62. Set Wi-Fi
  63. If
  64. Set Bluetooth
  65. If
  66. Set AirDrop
  67. If
  68. Set Focus
  69. If
  70. Set Low Power Mode
  71. If
  72. Toggle Color Filters
    com.apple.AccessibilityUtilities.AXSettingsShortcuts
  73. If
  74. Set Appearance
  75. Set True Tone
  76. Set Night Shift
  77. Accessibility Auto Brightness Enabled Entity Updatable Entity
    com.apple.AccessibilityUIServer
  78. Toggle Reduce Transparency
    com.apple.AccessibilityUtilities.AXSettingsShortcuts
  79. Toggle White Point
    com.apple.AccessibilityUtilities.AXSettingsShortcuts
  80. Set Brightness
  81. If
  82. Toggle Reduce Motion
    com.apple.AccessibilityUtilities.AXSettingsShortcuts
  83. If
  84. Set Cellular Data
  85. If
  86. If
  87. Set Voice Data Mode
    com.apple.ShortcutsActions
  88. If
  89. If
  90. Comment
    These are the actions that return all settings back to normal when Extend Battery is turned off.
  91. Set Low Power Mode
  92. Set Focus
  93. Set Wi-Fi
  94. Set Bluetooth
  95. Set AirDrop
  96. Toggle Color Filters
    com.apple.AccessibilityUtilities.AXSettingsShortcuts
  97. Set True Tone
  98. Toggle Reduce Transparency
    com.apple.AccessibilityUtilities.AXSettingsShortcuts
  99. Toggle Reduce Motion
    com.apple.AccessibilityUtilities.AXSettingsShortcuts
  100. Toggle White Point
    com.apple.AccessibilityUtilities.AXSettingsShortcuts
  101. Set Brightness
  102. Set Cellular Data
  103. Set Voice Data Mode
    com.apple.ShortcutsActions
  104. Accessibility Auto Brightness Enabled Entity Updatable Entity
    com.apple.AccessibilityUIServer
  105. If
  106. Show Notification
    Variable "Action" has an unrecognized value
  107. If
  108. Show Notification
    Variable "Action" does not have any value
  109. Stop This Shortcut

Als Code ansehen
Beta

Jede Aktion dieses Kurzbefehls als Cherri ausgeschrieben, eine Programmiersprache für Kurzbefehle. Ideal, um zu lernen, wie er funktioniert.

#define mac false
#include 'actions/web'
#include 'actions/network'
#define color yellow
#define glyph lightningBolt

// First, check if this shortcut was run from an Automation that passed an action word input to it.

@Action = "Null"

if ShortcutInput {
	@Action = ShortcutInput
}
// Update checking actions. Note that update checks will only run if the device is connected to WiFi and if the shortcut was not run from an Automation.

@Version = "1.4"
getWifiDetail("")

if  && @Action == "Null" {
	const ContentsOfURL = downloadURL("https://shortcuty.app/api/shortcuts/d47dfe35-9e99-40c4-81d7-ac5a24d04d51/version")
	if ContentsOfURL > @Version {
		// If version published on Shortcuty is greater than the version on your local device, start update actions.

		menu "An update for Extend Battery is available! Do you want to open the download/release notes page now?\n[  {@Version}  ->  {ContentsOfURL}  ]" {
		item "Yes":
			// Open Shortcuty page of the new updated shortcut.

			openURL("https://browse.shortcuty.app/shortcut/d47dfe35-9e99-40c4-81d7-ac5a24d04d51")
			stop()
		item "No, just run Extend Battery":
		item "Remind me in 1 hour and continue":
			currentDate()
			adjustDate(, "")
			rawAction("is.workflow.actions.addnewreminder", {
				"WFAlertCustomTime": "{}",
				"WFAlertEnabled": "Alert",
				"WFCalendarDescriptor": "Ask",
				"WFCalendarItemTitle": "This is your reminder to update Extend Battery. Use the attached link to do so!",
				"WFURL": "https://browse.shortcuty.app/shortcut/d47dfe35-9e99-40c4-81d7-ac5a24d04d51"
			})
			confirm("You will receive a reminder 1 hour from now! The rest of Extend Battery will now continue.")
		}
	}
}
// This Shortcut includes a feature that lets you choose whether or not to enable a Focus mode each time it is run. Please type the name of your preferred Focus mode to associate with this shortcut. Note that capitalization and spelling must match exactly.

const Text = "Do Not Disturb"
// Start of this shortcut’s main actions.


if @Action == "Null" {
	menu "Turn On or Off?" {
	item HandsFreeEnable:
		@Action = "Off"
	item On:
		@Action = On
	item Off:
		@Action = Off
	}
}

if @Action {
	if @Action == HandsFreeEnable {
		// Enable Extend Battery with an Automation, with one tap, or if the shortcut was run with Siri, with one voice response.

		const NetworkDetails = getWifiDetail("")
		if !NetworkDetails {
			setWifi(0)
		}
		setAirdropReceiving("Off")
		setLowPowerMode(false)
		darkMode()
		setTrueTone(0)
		setNightShift(0)
		setReduceTransparency(false)
		setReduceMotion(false)
		rawAction("com.apple.AccessibilityUIServer.AccessibilityAutoBrightnessEnabledEntity-UpdatableEntity", {
			"WFTableTemplate": "",
			"value": ""
		})
		toggleWhitePoint()
		setBrightness(1)
		toggleFocusMode()
	} else {
		if @Action == On {
			// List of available options to enable/disable.

			const List = list("Disable WiFi", "Disable Cellular Data\n(Calls and SMS still work)", "Disable Bluetooth", "Disable AirDrop", "Reduce Backlight", "Reduce Motion", "Only Use LTE", "Enable Low Power Mode", "Enable Focus Mode", "Enable Green Color Filter\n(Experimental)")
			const SelectedItem = chooseFromList(List, "Choose Your Configuration", true, true)
			if SelectedItem contains "Disable WiFi" {
				setWifi(0)
			}
			if SelectedItem contains "Disable Bluetooth" {
				setBluetooth(0)
			}
			if SelectedItem contains "Disable AirDrop" {
				setAirdropReceiving("Off")
			}
			if SelectedItem contains "Enable Focus Mode" {
				setFocusMode(, "Turned Off")
			}
			if SelectedItem contains "Enable Low Power Mode" {
				setLowPowerMode(false)
			}
			if SelectedItem contains "Enable Green Color Filter\n(Experimental)" {
				toggleColorFilters()
			}
			if SelectedItem contains "Reduce Backlight" {
				darkMode()
				setTrueTone(0)
				setNightShift(0)
				rawAction("com.apple.AccessibilityUIServer.AccessibilityAutoBrightnessEnabledEntity-UpdatableEntity", {
					"WFTableTemplate": "",
					"value": ""
				})
				setReduceTransparency(false)
				setWhitePoint(1)
				setBrightness(0.75)
			}
			if SelectedItem contains "Reduce Motion" {
				setReduceMotion(false)
			}
			if SelectedItem contains "Disable Cellular Data\n(Calls and SMS still work)" {
				setCellularData(0)
			} else {
				if SelectedItem contains "Only Use LTE" {
					rawAction("com.apple.ShortcutsActions.SetVoiceDataModeAction", {
						"AppIntentDescriptor": "",
						"ratMode": "",
						"sim": ""
					})
				}
			}
		} else {
			if @Action == Off {
				// These are the actions that return all settings back to normal when Extend Battery is turned off.

				setLowPowerMode(0)
				toggleFocusMode()
				setWifi(false)
				setBluetooth(false)
				setAirdropReceiving("Contacts Only")
				toggleColorFilters()
				setTrueTone(1)
				toggleReduceTransparency()
				setReduceMotion(0)
				toggleWhitePoint()
				setBrightness(0.4212121069431305)
				setCellularData(false)
				rawAction("com.apple.ShortcutsActions.SetVoiceDataModeAction", {
					"AppIntentDescriptor": "",
					"ratMode": "",
					"sim": ""
				})
				rawAction("com.apple.AccessibilityUIServer.AccessibilityAutoBrightnessEnabledEntity-UpdatableEntity", {
					"WFTableTemplate": "",
					"value": ""
				})
			} else {
				showNotification("Variable \"Action\" has an unrecognized value", "Extend Battery Error", @Action)
			}
		}
	}
} else {
	showNotification("Variable \"Action\" does not have any value", "Extend Battery Error", @Action)
}
stop()
In Cherri Playground öffnen Mit cherri 2.3.0 (GPL-2.0) dekompiliert. Eventuell sind kleine Korrekturen nötig, bevor es kompiliert wird.

Bewertungen und Rezensionen

Rezension schreiben
–
von 5
★★★★★
★★★★
★★★
★★
★
0 ratings

No reviews yet. Be the first to share what you think!

Werbung

Das gefällt dir vielleicht auch

Alle anzeigen
Werbung