ShareShortcuts

BattSave

Reduce power usage when battery is low

blackhatteam
Dupliquer « BattSave »

Tu as créé quelque chose de nouveau à partir de ce raccourci ? Partage-le comme version dérivée : il devient un raccourci à toi, que tu gères, et les deux pages renvoient l’une vers l’autre pour que blackhatteam soit crédité.

  1. 1Obtenez le raccourci et modifiez-le dans l’app Raccourcis. Donnez-lui un nom bien à lui.
  2. 2Partage-le depuis l’app Raccourcis et copie le lien iCloud.
  3. 3Reviens ici, colle le lien et décris ce qui change, par exemple : « Ajout d’une étape qui utilise Apple Intelligence pour personnaliser le texte. »
Créer mon fork
Téléchargements
36K
Enregistré
0
Actions
21
Catégorie
API
Version
1.1
Langue
EN

Reduce power usage when battery is low.

Do you need a way to conserve power when your phone battery gets to a level of 20 percent or below?

Do you need a partial charge and not a full charge of your battery?

BattSave may be the tool you need.

When you run the shortcut and your battery level is below 20 percent, it will run a couple of battery saving actions.

When you run the shortcut and your battery is above or has charged up to 50 percent, you get a prompt that you are good to go.

Nouveautés

Version 1.1

Fix for iOS 16.3

Historique des versions
1.1 24 janv. 2023

Fix for iOS 16.3

1.0 20 janv. 2023

First release

Ce qu’il fait

21 actions
  1. Get File
  2. If
  3. Create Folder
  4. Show Alert
  5. Open URLs
  6. Wait
  7. Text
  8. Close Tab
    com.apple.mobilesafari
  9. Show Alert
  10. Get Battery Level
  11. Set Variable
    Battery Level
  12. Calculate
  13. If
  14. Set Low Power Mode
  15. Set Brightness
  16. Show Notification
    Enabled!
  17. If
  18. If
  19. Set Low Power Mode
  20. Set Brightness
  21. Show Notification
    Good to go!

Afficher en tant que code
Bêta

Chaque action de ce raccourci écrite en Cherri, un langage de programmation pour Raccourcis. Idéal pour comprendre son fonctionnement.

#define mac false
#include 'actions/web'
#include 'actions/documents'
#define color green
#define glyph battery

const File = getFileFromFolder(, "BattSave", false)

if !File {
	createFolder("BattSave")
	confirm("Run Initial Setup? ")
	openURL("http://www.blackhatteams.com/p/battsave.html")
	wait(4)
	const Text = "BattSave"
	rawAction("com.apple.mobilesafari.CloseTab", {
		"AppIntentDescriptor": "",
		"target": "Text"
	})
	confirm("Setup Complete! Run Shortcut? ")
}
getBatteryLevel()
@BatteryLevel
const CalculationResult = @BatteryLevel + 1

if CalculationResult < 20 {
	setLowPowerMode(false)
	setBrightness(0.2480315)
	showNotification("Enabled! ")
} else {
	if CalculationResult > 49 {
		setLowPowerMode(0)
		setBrightness(nil)
		showNotification("Good to go! ")
	}
}
Ouvrir dans Cherri Playground Décompilé avec cherri 2.3.0 (GPL-2.0). Quelques corrections peuvent être nécessaires avant la compilation.

Notes et avis

Écrire un avis
–
sur 5
★★★★★
★★★★
★★★
★★
★
0 ratings

Aucun avis pour le moment. Sois le premier à partager ton avis !

Publicité

Plus de blackhatteam

Tout afficher

Ça pourrait aussi te plaire

Tout afficher
Publicité