Отсканируй на iPhone, чтобы установить
Turn your action button into a play pause and dnd button. How it works: This shortcut uses the App Store app called “actions” to detect headphones and will pause or play your music, if AirPods aren’t detected, then you can set a focus mode to use. Instructions: Rename your audio playback destination in the shortcut to the name of your Bluetooth device, once you are done with that, you can set your focus mode on the shortcut too! I have mine set to reduce interruptions.
Что нового
Версия 1.0
First release
Что делает
Действий: 9-
Get Audio Playback Destinationcom.sindresorhus.Actions
-
If
-
Play/Pause
-
If
-
Get Current Focus
-
If
-
Set Focus
-
If
-
Set Focus
Посмотреть как код
Все действия этой команды, записанные на Cherri — языке программирования для приложения «Быстрые команды». Отлично подходит, чтобы разобраться, как она работает.
#define color gray
rawAction("com.sindresorhus.Actions.GetAudioPlaybackDestinationIntent", {
"AppIntentDescriptor": ""
})
if AudioPlaybackDestination == "Bluetooth headphone name" {
pause()
} else {
const CurrentFocus = getFocusMode()
if CurrentFocus {
DNDOff()
} else {
DNDOff()
}
}
Открыть в Cherri Playground
Декомпилировано с помощью cherri 2.3.0 (GPL-2.0). Перед компиляцией могут понадобиться небольшие исправления.
Оценки и отзывы
Написать отзыв–
из 5
★★★★★
★★★★
★★★
★★
★
0 ratings
Пока нет отзывов. Поделись мнением первым!
Реклама
Ещё от nemo-dead
Вам также может понравиться
Реклама