yes, I was thinking more of having a kind of "dotfile" approach to all my configs for automation on macOs, as there are so many different overlapping apps like BTT, KeyboardMaestro, skhd, Kando, Alfred, etc
I'd love to have a `.automation` folder in my home where I can add descriptions of all my menus, keyboard shortcuts, scripts, Shortcut App scripts, BTT config, etc, and each time I modify them it updates in the app
It would be nice to have a kind of overview of all my automations
Also I'd like it that each file is some kind of "executable markdown" container which can contain textual description, images, etc, and the scripts/configs themselves, and the bindings
Something like this
--
name: emoji-picker
author: xxx
description: Various emoji-related bindings
version: 1.0
url: xxx
license: ...
--
```@deps
ts: mdex>=1.0,<2.0
```
```@deps test
// deps only for testing, etc
```
```@include
// can seamlessly include other .mdex, libs, code, repos, etc
```
# Open emoji picker
The Raycast emoji finder is clean and easy to use, so I'll use it instead of the system picker
```@code ts openPicker
const openPicker = async (prompt: string = "") => {
api.url.open(`raycast://extensions/emoji?prompt={prompt}`);
}
```
```@test
// define some code to run tests and ensure everything works
```
## Trigger on `fn` key
```@binding key
trigger: @on(platform == "darwin") key=[fn]
action: code openPicker @(openPicker();)
# equivalently, action: api open("raycast://...")
```
## When called as a CLI, allow to pass an optional prompt to the emoji picker
This installs an `emoji` cli, which parses with an optional prompt
```@binding cli
name: emoji
args: [prompt=""]
action: code openPicker @(openPicker(prompt);)
```
## Add custom bindings through extensions
```@binding ext:alfred
keyword: emoji [query=""]
action: code openPicker @(openPicker(query);)
```
## Every hour, refresh the emojis
```@binding cron
every: 1h
action: code openPicker @(refreshEmojiData();)
```
## Create an UI
```@binding ui
name: emoji-ui
layout: ...
html: ...
css: ...
```
## Usage:
```sh
mdex list emoji
mdex info emoji-picker
mdex install @user/emoji-picker
mdex install emoji-picker.mdex # install or refresh script, install deps, setup key-bindings
mdex test emoji-picker.mdex
emoji "clown" # cli
mdex uninstall emoji-picker
# or trigger the `fn` shortcut
mdex logs emoji-picker
```
I'd love to have a `.automation` folder in my home where I can add descriptions of all my menus, keyboard shortcuts, scripts, Shortcut App scripts, BTT config, etc, and each time I modify them it updates in the app
It would be nice to have a kind of overview of all my automations
Also I'd like it that each file is some kind of "executable markdown" container which can contain textual description, images, etc, and the scripts/configs themselves, and the bindings
Something like this