files
This commit is contained in:
15
config/waybar/scripts/cava_config
Normal file
15
config/waybar/scripts/cava_config
Normal file
@@ -0,0 +1,15 @@
|
||||
[general]
|
||||
bars = 6
|
||||
|
||||
[output]
|
||||
method = raw
|
||||
raw_target = /dev/stdout
|
||||
data_format = ascii
|
||||
ascii_max_range = 7
|
||||
# Remove the 'ascii_data_format = box' lines—they don't apply to raw ascii mode.
|
||||
|
||||
[input]
|
||||
# If it stays as zeros even when music plays, try changing 'pulse' to 'pipewire'
|
||||
method = pulse
|
||||
source = auto
|
||||
|
||||
7
config/waybar/scripts/launch.sh
Executable file
7
config/waybar/scripts/launch.sh
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
killall -9 waybar
|
||||
swaync-client --reload-css
|
||||
|
||||
waybar &
|
||||
# swaync &
|
||||
22
config/waybar/scripts/waybar-cava.sh
Executable file
22
config/waybar/scripts/waybar-cava.sh
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Define the bar icons (same ones in your config)
|
||||
icons=(" " "·" "–" "=" "≡" "≡" "≡")
|
||||
|
||||
killall -q cava
|
||||
# We read the numbers from CAVA and swap them for icons
|
||||
cava -p ~/.config/waybar/scripts/cava_config | while read -r line; do
|
||||
output=""
|
||||
# Loop through each digit in the output (e.g., '0', '1', '7')
|
||||
for ((i = 0; i < ${#line}; i++)); do
|
||||
digit="${line:$i:1}"
|
||||
# If it's a number, pick the icon. Otherwise, keep it.
|
||||
if [[ $digit =~ [0-7] ]]; then
|
||||
output+="${icons[$digit]}"
|
||||
# If it's a semicolon or anything else, just skip it
|
||||
else
|
||||
continue
|
||||
fi
|
||||
done
|
||||
echo "$output"
|
||||
done
|
||||
Reference in New Issue
Block a user