ShareShortcuts
Создать форк «I.B.L.O.S»

Создали что-то новое на основе этой команды? Поделитесь ей как форком: она станет вашей собственной командой, которой вы управляете, а обе страницы будут ссылаться друг на друга, чтобы shortgram получил(а) признание.

  1. 1Получите команду и измените её в приложении «Быстрые команды». Дайте ей собственное название.
  2. 2Поделись ею из приложения «Быстрые команды» и скопируй ссылку iCloud.
  3. 3Вернись сюда, вставь ссылку и опиши, что изменилось, например: «Добавлен шаг, который использует Apple Intelligence для персонализации текста».
Загрузки
63K
Сохранено
1
Действия
27
Категория
Utilities
Версия
1.0
Язык
EN

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

История версий
1.0 10 июн 2020 г.

First release

Что делает

Действий: 27
  1. Comment
    This gets the device model
  2. Get Device Details
  3. Set Variable
    DeviceModel
  4. Comment
    This gets the device battery level
  5. Get Battery Level
  6. Set Variable
    BatteryLevel
  7. Comment
    Yes or No if your device is charging
  8. Battery Status
    com.alexhay.ToolboxProForShortcuts
  9. Set Variable
    BatteryStatus
  10. If
  11. If
  12. Show Notification
    Plug in your device soon!
  13. Comment
    If your device is iPhone it will just run low power mode
  14. If
  15. Set Low Power Mode
  16. If
  17. Comment
    If your device is anything but iPhone it will turn Bluetooth off, turn of Wi-Fi, Turn reduce motion on, set brightness to 10%
  18. Set Bluetooth
  19. Set Wi-Fi
  20. Comment
    Turning reduce motion on might help or not To get to reduce motion go to: Setting -> Accessibility -> Motion (This is on iPad mini)
  21. Toggle Reduce Motion
    com.apple.AccessibilityUtilities.AXSettingsShortcuts
  22. Set Brightness
  23. If
  24. Set Bluetooth
  25. Set Wi-Fi
  26. Toggle Reduce Motion
    com.apple.AccessibilityUtilities.AXSettingsShortcuts
  27. 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

См. все

Вам также может понравиться

См. все
Реклама