#!/usr/bin/env bash # Update Hyprland border colors based on pywal colors # This script reads the pywal colors.json and applies them to Hyprland COLORS_JSON="$HOME/.cache/wal/colors.json" if [[ ! -f "$COLORS_JSON" ]]; then exit 1 fi # Extract colors from pywal (remove the # prefix) ACTIVE_COLOR=$(jq -r '.colors.color7' "$COLORS_JSON" | sed 's/#//') INACTIVE_COLOR=$(jq -r '.colors.color8' "$COLORS_JSON" | sed 's/#//') # Add alpha channel (ff for fully opaque) ACTIVE_COLOR="0xff${ACTIVE_COLOR}" INACTIVE_COLOR="0xff${INACTIVE_COLOR}" # Apply colors to Hyprland hyprctl keyword "general:col.active_border" "$ACTIVE_COLOR" hyprctl keyword "general:col.inactive_border" "$INACTIVE_COLOR"