mb-volmenu: audio menu

This commit is contained in:
2026-02-23 11:20:45 +01:00
parent 36572c159b
commit 0e71711f29
2 changed files with 129 additions and 6 deletions

View File

@@ -1,7 +1,8 @@
#!/bin/bash
#: Usage: transparent-cava (height in pixels) (width full or half)
#: example transparent-cava 100 full
#: default is 200px height and half width
#: transparent-cava (height in pixels) (width full, half or third)
. ~/.config/mabox/mabox.conf
CONFIG_DIR="$HOME/.config/terminator"
CONFIG_FILE="$CONFIG_DIR/cava-transparent"
@@ -29,15 +30,19 @@ cat <<EOF > ${CONFIG_FILE}
EOF
fi
CAVA_HEIGHT=${1:-200}
CAVA_WIDTH=${2:-half}
CAVA_HEIGHT=${cava_height:-200}
CAVA_WIDTH=${cava_width:-half}
WIDTH=$(wmctrl -d|grep "*"|awk '{print $4}'|cut -d'x' -f1)
HEIGHT=$(wmctrl -d|grep "*"|awk '{print $4}'|cut -d'x' -f2)
TOP=$((HEIGHT-CAVA_HEIGHT))
LEFT=0
if [ "$CAVA_WIDTH" != "full" ];then
if [ "$CAVA_WIDTH" == "half" ];then
LEFT=$((WIDTH/4))
WIDTH=$((WIDTH/2))
elif [ "$CAVA_WIDTH" == "third" ];then
LEFT=$((WIDTH/3))
WIDTH=$((WIDTH/3))
else
:
fi