aboutsummaryrefslogtreecommitdiffstats
path: root/config/hypr
diff options
context:
space:
mode:
authorEcys <73040912+Eccys@users.noreply.github.com>2024-07-02 02:34:48 +0000
committerGitHub <noreply@github.com>2024-07-02 02:34:48 +0000
commit24d18bef5a9353a94fbda43f5b09f151c3a82a17 (patch)
tree10a2e869ffe0e1d042c0dd4270310ef57b5a777f /config/hypr
parent9a543cd81eebe9d8572ee45cf3b33486a5d03626 (diff)
Added options to Brightness.sh
Fixed error where you couldn't change the step value. Also added option to change step value to your liking.
Diffstat (limited to 'config/hypr')
-rwxr-xr-xconfig/hypr/scripts/Brightness.sh13
1 files changed, 7 insertions, 6 deletions
diff --git a/config/hypr/scripts/Brightness.sh b/config/hypr/scripts/Brightness.sh
index 5c455ef1..c42837f2 100755
--- a/config/hypr/scripts/Brightness.sh
+++ b/config/hypr/scripts/Brightness.sh
@@ -4,6 +4,7 @@
iDIR="$HOME/.config/swaync/icons"
notification_timeout=1000
+step=10 # INCREASE/DECREASE BY THIS VALUE
# Get brightness
get_backlight() {
@@ -37,10 +38,10 @@ change_backlight() {
current_brightness=$(get_backlight)
# Calculate new brightness
- if [[ "$1" == "+5%" ]]; then
- new_brightness=$((current_brightness + 5))
- elif [[ "$1" == "5%-" ]]; then
- new_brightness=$((current_brightness - 5))
+ if [[ "$1" == "+${step}%" ]]; then
+ new_brightness=$((current_brightness + step))
+ elif [[ "$1" == "${step}%-" ]]; then
+ new_brightness=$((current_brightness - step))
fi
# Ensure new brightness is within valid range
@@ -62,10 +63,10 @@ case "$1" in
get_backlight
;;
"--inc")
- change_backlight "+5%"
+ change_backlight "+${step}%"
;;
"--dec")
- change_backlight "5%-"
+ change_backlight "${step}%-"
;;
*)
get_backlight
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage