A Python-based IPC client that provides a dynamic, Holodex-inspired tiling layout for the Hyprland Wayland compositor. It's designed for multi-stream viewing, automatically arranging "chat" windows (double height) and "video" windows (single height) into a smart grid.
- Dynamic Grid Layout: Automatically tiles windows based on their type, creating a balanced and readable multi-view setup.
- Per-Workspace Activation: Toggle the layout on a per-workspace basis, allowing you to mix custom tiling with Hyprland's default layouts.
- Context-Aware Navigation & Swapping: Custom focus and swap commands that understand the visual geometry of the grid, providing an intuitive experience.
- HiDPI Aware: Correctly handles screen scaling and reserved space for status bars.
-
Dependencies: Make sure you have the following installed:
python(tested with >=3.12)- Python module
hyprland-ipc jqsocat
-
Clone the Repository:
git clone <repo-link> ~/.config/hypr/dd-layout
-
Setup the Python Environment:
cd ~/.config/hypr/dd-layout python -m venv venv venv/bin/pip install hyprland-ipc
-
Make Scripts Executable:
chmod +x start_dd_layout.sh stop_dd_layout.sh
-
Configure
dd_layout_script.py: Opendd_layout_script.pyand edit theCHAT_APP_IDSandVIDEO_APP_IDSlists to match theclassnames of the applications you use. You can find these by runninghyprctl clients. -
Add Keybindings to
hyprland.conf: Add the following lines to your~/.config/hypr/hyprland.conffile, adjusting paths if necessary.# In your ### KEYBINDINGS ### section # Toggle DD Layout bind = SUPER, I, exec, ~/.config/hypr/dd-layout/start_dd_layout.sh bind = SUPER_SHIFT, I, exec, ~/.config/hypr/dd-layout/stop_dd_layout.sh # Unified Navigation & Swap (uses a private socket) $socket = UNIX-CONNECT:/tmp/dd_layout_ws$(hyprctl activeworkspace -j | jq -r ".id").sock bind = SUPER, h, movefocus, l bind = SUPER, h, exec, echo "focus_left" | socat - $socket bind = SUPER, l, movefocus, r bind = SUPER, l, exec, echo "focus_right" | socat - $socket bind = SUPER, k, movefocus, u bind = SUPER, k, exec, echo "focus_up" | socat - $socket bind = SUPER, j, movefocus, d bind = SUPER, j, exec, echo "focus_down" | socat - $socket bind = SUPER_SHIFT, j, exec, echo "dd_swap_next" | socat - $socket bind = SUPER_SHIFT, k, exec, echo "dd_swap_prev" | socat - $socket
Special thanks to the following projects and authors:
- The LeftWM project, whose
Gridlayout provided the initial inspiration for the tiling logic. - peppapig450 for creating the excellent
hyprland-ipcPython library, which made this script possible.