initial commit

This commit is contained in:
2025-06-03 14:16:01 +03:00
commit 6fed9ef617
683 changed files with 109296 additions and 0 deletions

66
hypr/scripts/dimscreen.sh Executable file
View File

@@ -0,0 +1,66 @@
#!/bin/bash
# Example notifier script -- lowers screen brightness, then waits to be killed
# and restores previous brightness on exit.
## CONFIGURATION ##############################################################
# Brightness will be lowered to this value.
min_brightness=0
# If you have a driver without RandR backlight property (e.g. radeon), set this
# to use the sysfs interface and create a .conf file in /etc/tmpfiles.d/
# containing the following line to make the sysfs file writable for group
# "users":
#
# m /sys/class/backlight/acpi_video0/brightness 0664 root users - -
#
#sysfs_path=/sys/class/backlight/acpi_video0/brightness
# Time to sleep (in seconds) between increments when using sysfs. If unset or
# empty, fading is disabled.
fade_step_time=0.05
###############################################################################
get_brightness() {
brightnessctl get # Get current brightness level
}
set_brightness() {
brightnessctl set $1 # Set brightness to the specified percentage
}
fade_brightness() {
local current_brightness=$(get_brightness)
local target_brightness=$1
if [[ $current_brightness -eq $target_brightness ]]; then
return # No need to change brightness
fi
local step
local fade_steps=$(( (current_brightness - target_brightness) / 1000 ))
local increment=1000
for (( step=0; step<fade_steps; step++ )); do
if [[ ! -e /tmp/asleepin ]]; then
exit 0
fi
local new_brightness=$(( current_brightness - increment * (step + 1) ))
set_brightness $new_brightness
sleep $fade_step_time
done
set_brightness $target_brightness # Ensure we set to the exact target
}
trap 'exit 0' TERM INT
trap "set_brightness $(get_brightness); kill %%" EXIT
fade_brightness $min_brightness
while [ -e /tmp/asleepin ]; do
sleep 0.5
done
exit 0
#wait

14
hypr/scripts/gamemode.sh Executable file
View File

@@ -0,0 +1,14 @@
#!/usr/bin/env sh
HYPRGAMEMODE=$(hyprctl getoption animations:enabled | awk 'NR==1{print $2}')
if [ "$HYPRGAMEMODE" = 1 ] ; then
hyprctl --batch "\
keyword animations:enabled 0;\
keyword decoration:shadow:enabled 0;\
keyword decoration:blur:enabled 0;\
keyword general:gaps_in 0;\
keyword general:gaps_out 0;\
keyword general:border_size 1;\
keyword decoration:rounding 0"
exit
fi
hyprctl reload

View 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

39
hypr/scripts/weirdmouse.sh Executable file
View File

@@ -0,0 +1,39 @@
#!/bin/bash
# Define the file to store the position
POSITION_FILE="/tmp/weirdmouse"
# Initialize position if the file does not exist
if [ ! -f "$POSITION_FILE" ]; then
echo "0 0" > "$POSITION_FILE"
fi
# Read the current position from the file
read -r x y < "$POSITION_FILE"
# Update the position based on the argument
case "$1" in
up)
y=$((y - 10))
;;
down)
y=$((y + 10))
;;
left)
x=$((x - 10))
;;
right)
x=$((x + 10))
;;
*)
echo "Usage: $0 {up|down|left|right}"
exit 1
;;
esac
# Save the new position to the file
echo "$x $y" > "$POSITION_FILE"
# Move the mouse cursor to the new position
hyprctl dispatch movecursor "$x" "$y"