Skip to content

Commit f8c8463

Browse files
authored
fix: chromium support fix (#43)
1 parent 249cb47 commit f8c8463

3 files changed

Lines changed: 44 additions & 12 deletions

File tree

README.md

Lines changed: 31 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ This project thrives on community contributions. I'm happy to merge pull request
2828
### Configuration-First Approach
2929

3030
**No GUI settings panel.** GoVim embraces configuration files over UI settings because:
31+
3132
- ✅ Config files are faster and more powerful, plus easier for dotfile management
3233
- ✅ Easy to version control and share
3334
- ✅ No maintenance burden for UI code
@@ -36,6 +37,7 @@ This project thrives on community contributions. I'm happy to merge pull request
3637
This is an intentional design choice to keep the project lean, maintainable, and focused on what matters: keyboard-driven productivity.
3738

3839
**Key Advantages:**
40+
3941
- 🆓 **Always free** - No paywalls, no subscriptions, no "upgrade to pro"
4042
- 🛠️ **Power-user friendly** - Text-based config is version-controllable and shareable
4143
- 🤝 **Community-owned** - Your contributions shape the project's direction
@@ -67,7 +69,6 @@ This is an intentional design choice to keep the project lean, maintainable, and
6769
- Homerow supports `continuous clicks`, is that something important?
6870
- Maybe a new action (move_mouse), that just move the mouse to the point after clicking the hint, maybe useful for trying to hover something?
6971
- Maybe forces to certain input source? I normally just use English, but maybe it's useful for others
70-
- Chromium support sucks, I seldom use Chromium, but not really sure what is the best way to properly support it
7172
- Electron apps does not show hints on the first activation. Maybe there's some manual work need to be done after setting up electron support?
7273
- Cant actually make scroll works in Electron apps, what is the best approach? There are tons of random `AXGroup` where some is scrollable and some is not...
7374
- Sort of working in Mision Control, but it still shows hints from the frontmost app. How can we know that we are in mission control and ignore the frontmost app?
@@ -219,6 +220,7 @@ govim launch
219220
### ⚠️ Required Permissions
220221

221222
Grant Accessibility permissions:
223+
222224
1. Open **System Settings**
223225
2. Navigate to **Privacy & Security****Accessibility**
224226
3. Enable **GoVim**
@@ -264,6 +266,7 @@ govim launch
264266
**Default hotkey:** `Cmd+Shift+J`
265267

266268
Vim-style navigation keys:
269+
267270
- `j` / `k` - Scroll down/up
268271
- `h` / `l` - Scroll left/right
269272
- `Ctrl+d` / `Ctrl+u` - Page down/up
@@ -274,13 +277,15 @@ Vim-style navigation keys:
274277
### Menu Bar
275278

276279
The ⌨️ icon in your menu bar provides quick access to:
280+
277281
- Quit GoVim
278282

279283
## ⚙️ Configuration
280284

281285
### Config File Location
282286

283287
GoVim looks for configuration in:
288+
284289
- **macOS Convention:** `~/Library/Application Support/govim/config.toml`
285290
- **XDG Standard:** `~/.config/govim/config.toml`
286291
- **Custom Path:** Use `--config` flag: `govim launch --config /path/to/config.toml`
@@ -314,6 +319,7 @@ excluded_apps = [
314319
```
315320

316321
**Find an app's bundle ID:**
322+
317323
```bash
318324
osascript -e 'id of app "AppName"'
319325
```
@@ -353,6 +359,7 @@ hint_characters = "asdfghjklqwertyuiop" # 19 chars = 361 two-char combinations
353359
```
354360

355361
**Hint capacity reference:**
362+
356363
- 9 characters = 81 two-char hints
357364
- 12 characters = 144 two-char hints
358365
- 15 characters = 225 two-char hints
@@ -362,13 +369,29 @@ hint_characters = "asdfghjklqwertyuiop" # 19 chars = 361 two-char combinations
362369
GoVim includes built-in support for Electron apps and Chromium browsers.
363370

364371
**Supported Electron apps** (automatic):
372+
365373
- VS Code
366374
- Windsurf
367375
- Cursor
368376
- Slack
369377
- Spotify
370378
- Obsidian
379+
380+
**Supported Chromium browsers** (automatic):
381+
382+
- Chrome
383+
- Brave
384+
- Helium
385+
- Arc
386+
387+
**Supported Firefox browsers** (automatic):
388+
371389
- Firefox
390+
- Zen
391+
392+
> [!NOTE]
393+
> You can still add your browsers to `additional_bundles` if they aren't detected automatically.
394+
> Right now, chromium, firefox and electron apps are all under the same key, in future we might split them out.
372395
373396
**Configuration:**
374397

@@ -383,14 +406,6 @@ additional_bundles = [
383406
]
384407
```
385408

386-
**Chrome/Chromium setup:**
387-
1. Navigate to `chrome://accessibility`
388-
2. Enable **Native accessibility API support**
389-
3. Enable **Web accessibility**
390-
391-
> [!NOTE]
392-
> Chromium apps don't need to be added to `additional_bundles`. The accessibility settings in Chrome are sufficient.
393-
394409
## 🖥️ CLI Usage
395410

396411
GoVim provides comprehensive CLI commands with IPC (Inter-Process Communication) for controlling the daemon.
@@ -448,6 +463,7 @@ govim start
448463
### IPC Architecture
449464

450465
The CLI uses Unix domain sockets (`/tmp/govim.sock`) for:
466+
451467
- Fast, reliable communication between CLI and daemon
452468
- Multiple concurrent CLI commands
453469
- Proper error handling when daemon isn't running
@@ -466,6 +482,7 @@ The CLI uses Unix domain sockets (`/tmp/govim.sock`) for:
466482
If hints don't appear in Electron app content (VS Code, Windsurf, etc.):
467483

468484
1. Verify Electron support is enabled (it's on by default):
485+
469486
```toml
470487
[accessibility.electron_support]
471488
enable = true
@@ -476,6 +493,7 @@ If hints don't appear in Electron app content (VS Code, Windsurf, etc.):
476493
- `"Enabled AXManualAccessibility"`
477494

478495
3. If your app isn't in the built-in list, add it manually:
496+
479497
```toml
480498
[accessibility.electron_support]
481499
additional_bundles = ["com.your.app"]
@@ -486,6 +504,7 @@ If hints don't appear in Electron app content (VS Code, Windsurf, etc.):
486504
**Log location:** `~/Library/Logs/govim/app.log`
487505

488506
**Enable debug logging:**
507+
489508
```toml
490509
[logging]
491510
log_level = "debug"
@@ -508,6 +527,7 @@ govim launch
508527
## 🏗️ Architecture
509528

510529
GoVim is built with:
530+
511531
- **Go** - Core application logic, configuration, and CLI
512532
- **CGo/Objective-C** - macOS Accessibility API integration
513533
- **Native macOS APIs** - Overlay rendering and hotkey management
@@ -552,6 +572,7 @@ just lint # Run linter
552572
Version information is automatically injected at build time from git tags.
553573

554574
**Manual build with custom version:**
575+
555576
```bash
556577
go build -ldflags="-s -w -X github.com/y3owk1n/govim/internal/cli.Version=v1.0.0" \
557578
-o bin/govim cmd/govim/main.go
@@ -592,6 +613,7 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
592613
## 🙏 Acknowledgments
593614

594615
GoVim is inspired by these excellent projects:
616+
595617
- [Homerow](https://www.homerow.app/) - Modern keyboard navigation for macOS
596618
- [Vimac](https://github.com/dexterleng/vimac) - Vim-style keyboard navigation
597619
- [Shortcat](https://shortcat.app/) - Keyboard productivity tool

internal/accessibility/accessible_apps.go

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,20 @@ package accessibility
33
import "strings"
44

55
var KnownElectronBundles = []string{
6-
"org.mozilla.firefox", // NOTE: why is this here? It's not an electron app, but the same logic to enable `AXEnhancedUserInterface`. Put it here first until we have a better manager for this.
6+
// browsers
7+
// NOTE: why is this here? It's not an electron app, but the same logic to enable `AXEnhancedUserInterface`. Put it here first until we have a better manager for this.
8+
// Chromium-based browsers
9+
"net.imput.helium",
10+
"com.google.Chrome",
11+
"com.brave.Browser",
12+
"company.thebrowser.Browser",
13+
// Firefox-based browsers
14+
"org.mozilla.firefox",
15+
"app.zen-browser.zen",
16+
// electrons
717
"com.microsoft.VSCode",
818
"com.exafunction.windsurf",
9-
"com.todesktop.230313mzl4w4u92",
19+
"com.todesktop.230313mzl4w4u92", // cursor
1020
"com.tinyspeck.slackmacgap",
1121
"com.spotify.client",
1222
"md.obsidian",

internal/accessibility/accessible_apps_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ func TestIsLikelyElectronBundle(t *testing.T) {
1111
{"Firefox", "org.mozilla.firefox", true},
1212
{"Windsurf", "com.exafunction.windsurf", true},
1313
{"Visual Studio Code", "com.microsoft.VSCode", true},
14+
{"Chrome", "com.google.Chrome", true},
1415

1516
// Non-Electron apps
1617
{"Safari", "com.apple.Safari", false},
1718
{"Finder", "com.apple.finder", false},
18-
{"Chrome", "com.google.Chrome", false},
1919

2020
// Edge cases
2121
{"Empty", "", false},

0 commit comments

Comments
 (0)