Skip to content

twetto/dd-layout

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DD Layout - A Holodex-Style Tiling Manager for Hyprland

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.

Demo video

Features

  • 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.

Installation

  1. Dependencies: Make sure you have the following installed:

    • python (tested with >=3.12)
    • Python module hyprland-ipc
    • jq
    • socat
  2. Clone the Repository:

    git clone <repo-link> ~/.config/hypr/dd-layout
  3. Setup the Python Environment:

    cd ~/.config/hypr/dd-layout
    python -m venv venv
    venv/bin/pip install hyprland-ipc
  4. Make Scripts Executable:

    chmod +x start_dd_layout.sh stop_dd_layout.sh

Usage

  1. Configure dd_layout_script.py: Open dd_layout_script.py and edit the CHAT_APP_IDS and VIDEO_APP_IDS lists to match the class names of the applications you use. You can find these by running hyprctl clients.

  2. Add Keybindings to hyprland.conf: Add the following lines to your ~/.config/hypr/hyprland.conf file, 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

Acknowledgements

Special thanks to the following projects and authors:

  • The LeftWM project, whose Grid layout provided the initial inspiration for the tiling logic.
  • peppapig450 for creating the excellent hyprland-ipc Python library, which made this script possible.

About

A Holodex-Style Tiling Layout for Hyprland with a Python IPC Client

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors