#!/bin/bash # omarchy:summary=Set or toggle rounded Walker corners # omarchy:args=[toggle|sharp|round] # omarchy:examples=omarchy style corners walker toggle | omarchy style corners walker round | omarchy style corners walker sharp TOGGLES_CSS="$HOME/.local/state/omarchy/toggles/walker.css" set_radius() { local radius="$1" mkdir -p "$(dirname "$TOGGLES_CSS")" printf '.box-wrapper { border-radius: %spx; }\n' "$radius" >"$TOGGLES_CSS" } case "${1:-toggle}" in round) set_radius 6 ;; sharp) set_radius 0 ;; toggle) if [[ -f $TOGGLES_CSS ]] && grep -q 'border-radius: 6px;' "$TOGGLES_CSS"; then set_radius 0 else set_radius 6 fi ;; *) echo "Usage: omarchy-style-corners-walker [toggle|sharp|round]" exit 1 ;; esac omarchy-restart-walker