You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+89-63Lines changed: 89 additions & 63 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,8 +12,9 @@ A tiny, no-nonsense app launcher. Press `⌘ Space`, type a few letters, hit `En
12
12
13
13
-**Global hotkey**: toggles with `⌘ Space` (configurable in code).
14
14
-**Fuzzy search**: type fragments like `gc` → finds “Google Chrome”.
15
-
-**Multi-monitor aware**: opens on the active display; plays nicely with separate Spaces.
16
-
-**Hot-reload config**: edit `config.toml` and it live-applies (colors, fonts, size).
15
+
-**Multi‑monitor aware**: opens on the active display; plays nicely with separate Spaces.
16
+
-**Hot‑reload config**: edit `config.toml` and it live‑applies (colors, fonts, size).
17
+
-**Theme filtering & switching**: press `Ctrl‑T` to filter themes by name and apply instantly.
17
18
-**Lightweight**: ~20 MB RAM, instant launch.
18
19
-**Window switching**: list running app windows and jump to them (across Spaces).
19
20
@@ -28,7 +29,7 @@ A tiny, no-nonsense app launcher. Press `⌘ Space`, type a few letters, hit `En
28
29
-`/System/Applications`
29
30
-`~/Applications`
30
31
-**Launching**: opens the selected `.app` bundle.
31
-
-**Switching**: focuses an existing app/window using Accessibility APIs plus a small amount of Mission Control key-emulation (see below).
32
+
-**Switching**: focuses an existing app/window using Accessibility APIs plus a small amount of Mission Control key‑emulation (see below).
32
33
33
34
---
34
35
@@ -41,14 +42,14 @@ YAL gathers a snapshot of displays → spaces → windows, then focuses the one
41
42
- list managed displays and their Spaces (`CGSCopyManagedDisplaySpaces`),
42
43
- enumerate windows per Space (`SLSCopyWindowsWithOptionsAndTags` + iterators),
43
44
- infer window type (normal/utility/fullscreen/minimized) from **level** and **tag** bits.
44
-
(Heuristics include flags like `TAG_HAS_TITLEBAR_LIKE`, and “minimized-ish” masks observed on recent macOS builds.)
45
+
(Heuristics include flags like `TAG_HAS_TITLEBAR_LIKE`, and “minimized‑ish” masks observed on recent macOS builds.)
45
46
46
47
-**Metadata enrichment (CoreGraphics)**
47
48
Separately reads the public `CGWindowListCopyWindowInfo` snapshot to attach **PID**, **owner name**, and **title** to each window ID. This is also why YAL needs **Screen Recording** permission (macOS requires it to access full window metadata).
48
49
49
50
-**Space targeting**
50
51
To jump across Spaces, YAL identifies the **display** that contains the target Space, warps the cursor to that display’s center (so Mission Control shortcuts address the right display), then:
51
-
- uses `Control + <digit>` for Spaces 1–10 when available, or
52
+
- uses `Control + <digit>` for Desktops 1–10 when available, or
52
53
-`Control + Left/Right` to walk to the desired index.
53
54
54
55
-**Focusing the exact window (AX)**
@@ -105,7 +106,7 @@ Tested on Apple Silicon with **macOS 15+**.
105
106
106
107
YAL needs both:
107
108
108
-
-**Accessibility** (to focus/raise windows)
109
+
-**Accessibility** (to focus/raise windows and post Mission Control keys)
109
110
-**Screen Recording** (to read window metadata via CGWindow)
110
111
111
112
System Settings → **Privacy & Security** → **Accessibility** and **Screen Recording**.
@@ -116,13 +117,13 @@ For switching to work effectively, make sure Mission Control shortcuts are turne
# Define one or more named themes. Keys are color hex strings.
166
+
# You can reference any section name here from `config.toml`'s `theme` key.
167
+
168
+
[catppuccin-mocha]
169
+
bg_color = "#1e1e2e"
170
+
fg_color = "#45475a"
171
+
bg_font_color = "#cdd6f4"
172
+
fg_font_color = "#cdd6f4"
173
+
174
+
[custom]
175
+
bg_color = "#0f0f14"
176
+
fg_color = "#2f81f7"
177
+
bg_font_color = "#e6e6e6"
178
+
fg_font_color = "#ffffff"
179
+
```
157
180
181
+
**`~/.config/yal/config.toml`**
158
182
```toml
159
-
# ~/.config/yal/config.toml
160
-
161
-
# UI
162
-
font = "ui-monospace, SFMono-Regular, Menlo, monospace"
163
-
font_size = 14.0
164
-
165
-
# Colors (CSS)
166
-
bg_color = "#111111"# app background
167
-
fg_color = "#2a6ff0"# highlight background for the selected row
168
-
bg_font_color = "#e6e6e6"# normal text color (on bg_color)
169
-
fg_font_color = "#ffffff"# text color on the highlighted row
170
-
171
-
# Window (logical points)
172
-
w_width = 720.0
173
-
w_height = 380.0
174
-
175
-
# Layout
176
-
align_h = "center"# left | center | right
177
-
align_v = "top"# top | center | bottom
178
-
margin_x = 12.0# px inset for left/right align
179
-
margin_y = 12.0# px inset for top/bottom align
180
-
padding = 6.0# inner padding
181
-
line_height = 1.2# line height multiplier
182
-
w_radius = 10.0# corner radius in px
183
+
# Pick a theme by name (must exist in themes.toml).
184
+
theme = "catppuccin-mocha"
185
+
186
+
[font]
187
+
font = "Fira Code"# CSS font stack allowed
188
+
font_size = 12.0# px
189
+
190
+
[window]
191
+
w_width = 400.0# logical points
192
+
w_height = 250.0
193
+
align_h = "center"# left | center | right
194
+
align_v = "center"# top | center | bottom
195
+
line_height = 0.8
196
+
padding = 8
197
+
w_radius = 0
183
198
```
184
199
200
+
> Any change you save will be applied live. If you change `theme = ...`, the UI updates immediately. `Ctrl‑T` in YAL lets you preview and apply a theme without editing files; it writes back the selected theme name to `config.toml` for persistence.
0 commit comments