initial commit
This commit is contained in:
22
hypr/scripts/grayscale-toggle.sh
Executable file
22
hypr/scripts/grayscale-toggle.sh
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/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
|
||||
Reference in New Issue
Block a user