- Modularize Hyprland config into hyprland.d/ - Implement infinitely scalable monitor/workspace logic using templates and loop-based data structures - Consolidate host-specific configs (hyprlock, hyprpaper, waybar) into single templates - Resolve waybar symlink conflict and fix template execution errors - Integrate chezmoi data variables for scale, resolution, and peripherals
863 B
863 B
weight, title
| weight | title |
|---|---|
| 16 | Expanding functionality |
Hyprland exposes two powerful sockets for you to use.
The first, socket1, can be fully controlled with hyprctl, see its usage
here.
The second, socket2, sends events for certain changes / actions and can be used to react to different events. See its description here.
Example script
This bash script will change the outer gaps to 20 if the currently focused monitor is DP-1, and 30 otherwise.
#!/usr/bin/env bash
function handle {
if [[ ${1:0:10} == "focusedmon" ]]; then
if [[ ${1:12:4} == "DP-1" ]]; then
hyprctl keyword general:gaps_out 20
else
hyprctl keyword general:gaps_out 30
fi
fi
}
socat - "UNIX-CONNECT:$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock" | while read -r line; do handle "$line"; done