eww: remove player window

This commit is contained in:
2025-06-18 14:21:27 +02:00
parent 285f7a37b7
commit 656573db82
21 changed files with 75 additions and 477 deletions

40
eww/Main/scripts/cava Executable file
View File

@@ -0,0 +1,40 @@
#! /bin/bash
bar="▁▂▃▄▅▆▇█"
dict="s/;//g;"
# creating "dictionary" to replace char with bar
i=0
while [ $i -lt ${#bar} ]
do
dict="${dict}s/$i/${bar:$i:1}/g;"
i=$((i=i+1))
done
# make sure to clean pipe
pipe="/tmp/cava.fifo"
if [ -p $pipe ]; then
unlink $pipe
fi
mkfifo $pipe
# write cava config
config_file="/tmp/waybar_cava_config"
echo "
[general]
bars = 33
[output]
method = raw
raw_target = $pipe
data_format = ascii
ascii_max_range = 7
" > $config_file
# run cava in the background
cava -p $config_file &
# reading data from fifo
while read -r cmd; do
echo $cmd | sed $dict
done < $pipe