Debugging Guide
i3 Keybinding Issues
Variable Expansion Bug
i3 has a bug where using exec $variable with a variable that has no additional arguments can fail silently.
Example:
# BROKEN - fails silently
set $menu $HOME/.local/share/openriot/install/openriot --rofi
bindsym $mod+D exec $menu
# WORKS - use direct path or add extra args
bindsym $mod+D exec $openriot_bin --rofi
Diagnosis steps:
- Replace the command with something simple (e.g.,
touch /tmp/test) - If simple command works, the issue is the command itself
- Try using direct path instead of variable
- Try adding dummy arguments
Config Validation
- Always test with
i3 -C -c <file>before copying — catches syntax errors - Path expansion in
include:~/.config/...does NOT expand — use relative paths - Variable scope across includes:
set $varinconfigmay not exist in included files — define where needed
General Debugging Tips
Verify Before Proposing
- Check if files/directories actually exist
- Use
lsorgit statusto verify state - Don’t assume - verify
Path Verification
- Verify character-by-character:
grendelnotgrandel,ProtonSyncnotProtomSync - Typos waste time and break things
Replace_all is Dangerous
- Double-check BEFORE using — can corrupt variable definitions
- Verify the file after replace_all