HeadlinesBriefing favicon HeadlinesBriefing.com

i3 Window Manager Gets Emacs Integration

Hacker News •
×

A developer tired of slow workarounds created a custom patch for i3 window manager to integrate keybindings with Emacs. After finding that shell-based scripts with xdotool and emacsclient introduced unacceptable latency (30-100ms), the developer modified i3's source code directly to allow Emacs to intercept key presses when focused.

The solution involved modifying the Binding struct to include a passthrough field for window classes and updating i3's parser to support a --passthrough option. When a key binding has passthrough enabled, i3 checks if the focused window matches the specified class and forwards the key event directly, bypassing the shell-based intermediary.

This custom patch solves a common pain point for power users who frequently switch between graphical windows and Emacs. The developer notes the patch might not be the most elegant solution but provides a working alternative to the slow script-based approaches, with the code available for others to review and improve.