#!/bin/bash

FILENAME="$HOME/.config/hypr/grayscale.conf"

# Check if the file exists
if [ ! -f "$FILENAME" ]; then
    echo "File not found: $FILENAME"
    exit 1
fi

# Check if the file is already commented
if grep -q '^[[:space:]]*#' "$FILENAME"; then
    echo "Uncommenting the file: $FILENAME"
    # Uncomment the lines
    sed -i 's/^[[:space:]]*#\s*//g' "$FILENAME"
else
    echo "Commenting the file: $FILENAME"
    # Comment the lines
    sed -i 's/^/# /' "$FILENAME"
fi

hyprctl reload
