set shell := ["bash", "-euo", "pipefail", "-c"]

# Run taffybar in the foreground (blocks the terminal).
run:
	@scripts/taffybar-run

# Restart taffybar in the background using cabal run.
restart:
	@scripts/taffybar-restart

# Capture the reserved top area (taffybar) on the focused monitor.
screenshot:
	@scripts/taffybar-screenshot

# Capture the reserved top area on all monitors (one file per monitor).
screenshot-all:
	@scripts/taffybar-screenshot-all

# Crop the top bar out of an existing screenshot (defaults to 56px high).
crop in out="":
	@if [[ -n "{{out}}" ]]; then scripts/taffybar-crop-bar "{{in}}" "{{out}}"; else scripts/taffybar-crop-bar "{{in}}"; fi
