This commit is contained in:
nomadics9 2024-10-04 05:52:05 +03:00
parent 4dcf6c4262
commit a0a4fbb33e
3 changed files with 70 additions and 0 deletions

18
scripts/brightness Executable file
View file

@ -0,0 +1,18 @@
#!/bin/sh
down() {
brightnessctl set 5%-
brightnessctl=$(brightnessctl | grep -oP "(\d+(\.\d+)?(?=%))")
dunstify -a "Brightness" "Decreasing to $brightnessctl%" -h int:value:"$brightnessctl" -i ~/icons/brightness.png -r 2593 -u normal
}
up() {
brightnessctl set 5%+
brightnessctl=$(brightnessctl | grep -oP "(\d+(\.\d+)?(?=%))")
dunstify -a "BRightness" "Increasing to $brightnessctl%" -h int:value:"$brightnessctl" -i ~/icons/brightness.png -r 2593 -u normal
}
case "$1" in
up) up;;
down) down;;
esac

18
scripts/screenHz.sh Executable file
View file

@ -0,0 +1,18 @@
if hyprctl monitors | grep '2560x1600@120.00000'; then
json='{"text": "60", "tooltip": "Frequency", "class": "custom/power-menu", "percentage": 60 }'
echo -e $json >~/.config/hypr/scripts/hz.json
hyprctl keyword monitor eDP-1,2560x1600@60,0x0,1.25 && dunstify "Set to 60Hz" -a "Monitor" -u "low" -i "/home/nomad/icons/desktop.png" -r "123"
exit
fi
if hyprctl monitors | grep '2560x1600@90.00000'; then
json='{"text": "120", "tooltip": "Frequency", "class": "custom/power-menu", "percentage": 120 }'
echo -e $json >~/.config/hypr/scripts/hz.json
hyprctl keyword monitor eDP-1,2560x1600@120,0x0,1.25 && dunstify "Set to 120Hz" -a "Monitor" -u "low" -i "/home/nomad/icons/desktop.png" -r "123"
exit
fi
if hyprctl monitors | grep '2560x1600@60.00200'; then
json='{"text": "90", "tooltip": "Frequency", "class": "custom/power-menu", "percentage": 90 }'
echo -e $json >~/.config/hypr/scripts/hz.json
hyprctl keyword monitor eDP-1,2560x1600@90,0x0,1.25 && dunstify "Set to 90Hz" -a "Monitor" -u "low" -i "/home/nomad/icons/desktop.png" -r "123"
exit
fi

34
scripts/volume Executable file
View file

@ -0,0 +1,34 @@
#!/bin/sh
down() {
pamixer -d 2
volume=$(pamixer --get-volume)
[$volume -gt 0 ] && volume=`expr $volume`
dunstify -a "Volume" "Decreasing to $volume%" -h int:value:"$volume" -i ~/icons/low-volume.png -r 2593 -u normal
canberra-gtk-play -i audio-volume-change -d "changevolume"
}
up() {
pamixer -i 2
volume=$(pamixer --get-volume)
[ $volume -lt 1000 ] && volume=`expr $volume`
dunstify -a "Volume" "Increasing to $volume%" -h int:value:"$volume" -i ~/icons/high-volume.png -r 2593 -u normal
canberra-gtk-play -i audio-volume-change -d "changevolume"
}
mute() {
muted="$(pamixer --get-mute)"
if $muted; then
pamixer -u
dunstify -a "VOLUME" "UNMUTED" -i ~/.config/dunst/assets/ui/volume_high.svg -r 2593 -u normal
else
pamixer -m
dunstify -a "VOLUME" "MUTED" -i ~/.config/dunst/assets/ui/volume_muted.svg -r 2593 -u normal
fi
}
case "$1" in
up) up;;
down) down;;
mute) mute;;
esac