Skip to content

Instantly share code, notes, and snippets.

@simonvc
Created February 27, 2026 03:19
Show Gist options
  • Select an option

  • Save simonvc/803bc783755f8a43423ba837d314e1c5 to your computer and use it in GitHub Desktop.

Select an option

Save simonvc/803bc783755f8a43423ba837d314e1c5 to your computer and use it in GitHub Desktop.
my M1 asahi fedora niri setup
# Airux Setup Notes
Fedora Asahi (M1 MacBook Air) running niri Wayland compositor.
## VoxType (v0.6.2)
Push-to-talk voice-to-text. Hold Right Alt to record, release to transcribe. Text is typed at the cursor via wtype.
- Config: `~/.config/voxtype/config.toml`
- Service: `~/.config/systemd/user/voxtype.service`
- Engine: Whisper (base.en model, stored in `~/.local/share/voxtype/models/`)
- Hotkey: Right Alt (RIGHTALT), push-to-talk mode, via evdev (reads `/dev/input/event*` passively, no exclusive grab)
- Output: types directly via wtype, falls back to clipboard
- User must be in `input` group for evdev hotkey detection
### Controlling
```
systemctl --user start/stop/restart voxtype
voxtype record toggle # toggle from CLI or compositor keybinding
voxtype status # check status (also integrates with waybar)
```
### Gotcha: ptt.service
There is an older Python PTT daemon at `~/.local/bin/ptt-daemon.py` with a matching `~/.config/systemd/user/ptt.service`. This daemon uses `EVIOCGRAB` (exclusive grab) on the keyboard device, which steals the keyboard from niri and breaks all keyboard shortcuts. It has been disabled. Do not re-enable it — VoxType replaces it entirely.
## CapsLock Remapping (caps2esc via interception-tools)
CapsLock is remapped at the kernel input level using interception-tools + caps2esc:
- Tap CapsLock = Escape
- Hold CapsLock = Ctrl
### How it works
A system service (`udevmon.service`) runs at boot and watches for keyboard devices. When a keyboard with KEY_CAPSLOCK appears, it runs:
```
intercept -g $DEVNODE | caps2esc -m 1 | uinput -d $DEVNODE
```
1. `intercept -g` grabs the physical keyboard (`/dev/input/event1`) exclusively
2. `caps2esc -m 1` transforms CapsLock into Esc (tap) or Ctrl (hold)
3. `uinput -d` creates a virtual keyboard (`/dev/input/event4`) with the modified events
Niri and all other programs read from the virtual keyboard (event4), not the physical one (event1).
- Service: `/etc/systemd/system/udevmon.service`
- Config: `/etc/interception/udevmon.d/caps2esc.yaml`
- Mode 1 (`-m 1`): minimal mode — only CapsLock is affected
## Niri Custom Keybindings
Config: `~/.config/niri/config.kdl`
These bindings differ from or extend the niri defaults:
| Bind | Action | Notes |
|------|--------|-------|
| Mod+Return | Open ghostty terminal | Default is no terminal bound |
| Mod+C | Copy (Ctrl+Insert via wtype) | macOS-style, uses wtype to send the actual keypress |
| Mod+V | Paste (Shift+Insert via wtype) | macOS-style, uses wtype to send the actual keypress |
| Mod+W | Close window | Default is Mod+Shift+Q |
| Mod+Shift+B | Open chromium-browser | |
| Mod+Shift+4 | Area screenshot | Runs `~/.local/bin/area-screenshot` |
| Mod+Shift+5 | Screen record | Runs `~/.local/bin/screen-record` |
| Mod+Space | App launcher (fuzzel) | Default is Mod+D |
| Super+Alt+L | Lock screen (swaylock) | |
| Mod+O | Toggle overview | |
| Mod+Shift+A | VoxType record toggle | Alternative to Right Alt push-to-talk |
### Startup programs
```
waybar
mako (notifications)
swaybg -c "#C75B3A" (wallpaper color)
swayidle + swaylock (auto-lock)
```
### Other non-default settings
- `prefer-no-csd` enabled (server-side decorations)
- `focus-follows-mouse` enabled
- Touchpad: tap enabled, natural scroll, scroll-factor 0.3
- Default column width: 50% (`proportion 0.5`)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment