mirror of
https://github.com/xsghetti/HyprCrux.git
synced 2025-07-03 13:50:38 -04:00
hyprpm/hyprlock
This commit is contained in:
parent
d4376c8ddf
commit
e973ebbc15
39 changed files with 2500 additions and 7 deletions
31
.config/hypr/scripts/spotifyvolumecontrol.sh
Executable file
31
.config/hypr/scripts/spotifyvolumecontrol.sh
Executable file
|
@ -0,0 +1,31 @@
|
|||
#!/bin/bash
|
||||
|
||||
# define the name of the player
|
||||
PLAYER="spotify"
|
||||
|
||||
# function to increase Spotify volume
|
||||
increase_volume() {
|
||||
playerctl --player="$PLAYER" volume 0.05+
|
||||
VOLUME=$(playerctl volume --player $PLAYER)
|
||||
dunstify -a Spotify -r 2 -t 1500 -i /usr/share/icons/Tela-circle-black/scalable/apps/com.spotify.Client.svg "Volume increased" "$VOLUME"
|
||||
}
|
||||
|
||||
# function to decrease Spotify volume
|
||||
decrease_volume() {
|
||||
playerctl --player="$PLAYER" volume 0.05-
|
||||
VOLUME=$(playerctl volume --player $PLAYER)
|
||||
dunstify -a Spotify -r 2 -t 1500 -i /usr/share/icons/Tela-circle-black/scalable/apps/com.spotify.Client.svg "Volume decreased" "$VOLUME"
|
||||
}
|
||||
|
||||
# check for the argument and perform the corresponding action
|
||||
case "$1" in
|
||||
"up")
|
||||
increase_volume
|
||||
;;
|
||||
"down")
|
||||
decrease_volume
|
||||
;;
|
||||
*)
|
||||
exit 1
|
||||
;;
|
||||
esac
|
Loading…
Add table
Add a link
Reference in a new issue