Major Update: created v4, new configs: alacritty, polybar, i3, and more.

This commit is contained in:
Keyitdev
2025-07-23 16:32:36 +02:00
parent fa1bbd4502
commit 7dcd9a13ad
451 changed files with 1380 additions and 7802 deletions
+28
View File
@@ -0,0 +1,28 @@
#!/bin/sh
# default
step=+5
vol_max=125
cur_vol_left=$(pactl get-sink-volume @DEFAULT_SINK@ | grep -o '[0-9]\+%' | sed -n '1p'| sed 's/%//g')
cur_vol_right=$(pactl get-sink-volume @DEFAULT_SINK@ | grep -o '[0-9]\+%' | sed -n '2p' | sed 's/%//g')
cur_vol_average=$(((cur_vol_left+cur_vol_right)/2))
while getopts s:m: flag
do
case "${flag}" in
s) step=${OPTARG};;
m) vol_max=${OPTARG};;
*) echo "Usage: -s <+value/-value> -m <max volume>";;
esac
done
new_vol=$((cur_vol_average + step))
if [ "$new_vol" -le "0" ]; then
pactl set-sink-volume @DEFAULT_SINK@ 0%
elif [ "$new_vol" -ge "$vol_max" ] ; then
pactl set-sink-volume @DEFAULT_SINK@ "$vol_max"%
else
pactl set-sink-volume @DEFAULT_SINK@ "$step"%
fi