#!/bin/sh # Cycle through Hyprland layouts LAYOUT=$(hyprctl getoption general:layout -j | jq -r '.str') ORIENTATION="" if [ "$LAYOUT" = "master" ]; then ORIENTATION=$(hyprctl getoption master:orientation -j | jq -r '.str') fi # Cycle: master-left -> master-top -> master-center -> dwindle -> master-left if [ "$LAYOUT" = "dwindle" ]; then hyprctl keyword general:layout master hyprctl keyword master:orientation left elif [ "$LAYOUT" = "master" ]; then case "$ORIENTATION" in left) hyprctl keyword master:orientation top ;; top) hyprctl keyword master:orientation center ;; center) hyprctl keyword general:layout dwindle ;; *) hyprctl keyword master:orientation left ;; esac fi