| 123456789101112131415161718192021222324 | #!/bin/bash# Get current monitor brightness for waybarMONITOR_SERIAL="6L1M413"VCP_CODE=10# Get current brightnesscurrent_output=$(ddcutil getvcp --sn "$MONITOR_SERIAL" "$VCP_CODE" 2>/dev/null)if [ $? -ne 0 ]; then    echo '{"text": "N/A", "tooltip": "Monitor not available"}'    exit 0fi# Parse current brightnesscurrent=$(echo "$current_output" | grep -oP 'current value\s*=\s*\K\d+')if [ -z "$current" ]; then    echo '{"text": "N/A", "tooltip": "Could not read brightness"}'    exit 0fi# Output JSON for waybarecho "{\"text\": \"$current%\", \"tooltip\": \"Monitor Brightness: $current%\"}"
 |