العودة إلى المهارات
get-focus-mode
بواسطة nickchristensen
Apple Apps & Services—لم يُقيَّم بعد
تقييمك
موجز
Get the current macOS Focus.
الوصف
ما الذي تفعله هذه المهارة
Reads the currently active macOS Focus mode and prints its name to stdout. Returns 'No Focus' when no mode is active, or the mode name (e.g. 'Do Not Disturb', 'Office', 'Sleep') when one is on.
Gives scripts direct programmatic access to Focus mode state without any GUI interaction or AppleScript boilerplate.
متى تستخدمها
- Check Focus mode before sending automated notifications
- Branch automation scripts based on current distraction settings
- Log Focus mode changes over time
- Trigger different workflows depending on work vs sleep hours
- Verify Focus mode state in shell pipelines
مثال على سير العمل
الإدخال
User asks: what Focus mode am I in right now?
الوكيل
- 1
Run get-focus-mode.sh
- 2
Read stdout output
- 3
Return the printed Focus mode name
الإخراج
'Do Not Disturb'
التثبيت
clawhub install nickchristensen/get-focus-modeشغّل أمر واجهة سطر الأوامر، أو الصق النص في Claude Code أو Cursor أو Codex أو أي وكيل برمجة تستخدمه.