#!/usr/bin/env bash

TARGET=${1:-20}

current=$(
    hyprctl getoption general:gaps_in 2>/dev/null \
    | grep -oE '[0-9]+' \
    | head -n1 \
    || echo 0
)

if [ "$current" -eq 0 ]; then
  hyprctl keyword general:gaps_in $TARGET
  hyprctl keyword general:gaps_out $TARGET
else
  hyprctl keyword general:gaps_in 0
  hyprctl keyword general:gaps_out 0
fi
