The Filters shortcut filters out blue light which is a high-energy, short-wavelength of visible light which can be harmful for the eyes.
Что нового
Версия 1.0
First release
Что делает
Действий: 28-
Choose from MenuAre you sure you want to turn Filters on?
-
Choose from MenuTurn on
-
Get Current Focus
-
Get Name
-
If
-
Show NotificationFilters could not be turned on because Ultra Low Power Mode is active
-
Nothing
-
If
-
Get Current Song
-
If
-
Toggle White Pointcom.apple.AccessibilityUtilities.AXSettingsShortcuts
-
Toggle Color Filterscom.apple.AccessibilityUtilities.AXSettingsShortcuts
-
If
-
Toggle White Pointcom.apple.AccessibilityUtilities.AXSettingsShortcuts
-
Set Volume
-
Toggle Color Filterscom.apple.AccessibilityUtilities.AXSettingsShortcuts
-
Choose from MenuCancel
-
If
-
Stop This Shortcut
-
If
-
Get Current Song
-
If
-
Toggle White Pointcom.apple.AccessibilityUtilities.AXSettingsShortcuts
-
Toggle Color Filterscom.apple.AccessibilityUtilities.AXSettingsShortcuts
-
If
-
Set Volume
-
Toggle White Pointcom.apple.AccessibilityUtilities.AXSettingsShortcuts
-
Toggle Color Filterscom.apple.AccessibilityUtilities.AXSettingsShortcuts
Посмотреть как код
Все действия этой команды, записанные на Cherri — языке программирования для приложения «Быстрые команды». Отлично подходит, чтобы разобраться, как она работает.
#include 'actions/settings'
#define color red
#define glyph handSlashOutline
menu "Are you sure you want to turn Filters on?" {
item "Turn on":
const CurrentFocus = getFocusMode()
const Name = getName(CurrentFocus)
if Name == "Ultra Low Power Mode" {
showNotification("Filters could not be turned on because Ultra Low Power Mode is active", Name)
} else {
const CurrentSong = getCurrentSong()
if CurrentSong {
setWhitePoint(false)
toggleColorFilters()
} else {
setWhitePoint(false)
setVolume(0.07742782)
toggleColorFilters()
}
}
item "Cancel":
if Name == "Ultra Low Power Mode" {
stop()
} else {
const CurrentSong1 = getCurrentSong()
if CurrentSong1 {
setWhitePoint(0)
toggleColorFilters()
} else {
setVolume(0.2506562)
setWhitePoint(0)
toggleColorFilters()
}
}
}
Открыть в Cherri Playground
Декомпилировано с помощью cherri 2.3.0 (GPL-2.0). Перед компиляцией могут понадобиться небольшие исправления.
Оценки и отзывы
Написать отзыв–
из 5
★★★★★
★★★★
★★★
★★
★
0 ratings
Пока нет отзывов. Поделись мнением первым!
Реклама
Ещё от celebrity
Вам также может понравиться
Реклама