https://github.com/rjkroege/getctxs
Component of Alfred workflow for choosing a MacOS Focus aka DoNotDisturb mode.
https://github.com/rjkroege/getctxs
Last synced: 8 months ago
JSON representation
Component of Alfred workflow for choosing a MacOS Focus aka DoNotDisturb mode.
- Host: GitHub
- URL: https://github.com/rjkroege/getctxs
- Owner: rjkroege
- Created: 2023-06-01T09:53:58.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-06-01T10:28:20.000Z (over 2 years ago)
- Last Synced: 2025-02-27T09:09:37.171Z (8 months ago)
- Language: Go
- Size: 2.93 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Recent versions of MacOS offer something called "Focus": [Set up a
Focus on Mac - Apple Support
(CA)](https://support.apple.com/en-ca/guide/mac-help/mchl613dc43f/mac).
This repository contains a simple tool for [Alfred - Productivity App
for macOS](https://www.alfredapp.com/) to read the set of defined
Focus modes and provide that as an autocomplete-capable list. I used
this to create an Alfred workflow to set my current focus.
# Implementation Notes
Apple doesn't seem to currently offer a pubic API to interrogate or
control the Focus mode. I believe that the internal component for this
is called `DoNotDisturb`. This has a private framework. Internet
searches suggest that the available Focus modes are listed in a JSON
file in `~Library/DoNotDisturb/DB/ModeConfigurations.json`. If there's
a nicer way to get the Focus mode than reading this file, feel free to
suggest it in an issue.
# Build
```
go install github.com/rjkroege/getctxs
```
should probably do the trick to stick it in your default `GOBIN`.