From 8e4bdc65ca9a2af0726c2cc1249ba87bfb70437c Mon Sep 17 00:00:00 2001 From: "Ja.KooLit" Date: Fri, 29 Dec 2023 21:33:06 +0900 Subject: Implementing custom waybar cava into styles and layouts Rename waybar_cava.sh to WaybarCava.sh remove cava module from the waybar modules bank clean up waybar styles --- config/hypr/scripts/WaybarCava.sh | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100755 config/hypr/scripts/WaybarCava.sh (limited to 'config/hypr/scripts/WaybarCava.sh') diff --git a/config/hypr/scripts/WaybarCava.sh b/config/hypr/scripts/WaybarCava.sh new file mode 100755 index 00000000..458a31bb --- /dev/null +++ b/config/hypr/scripts/WaybarCava.sh @@ -0,0 +1,29 @@ +# #! /bin/bash + +#----- Optimized bars animation without much CPU usage increase -------- +bar="▁▂▃▄▅▆▇█" +dict="s/;//g" + +# Calculate the length of the bar outside the loop +bar_length=${#bar} + +# Create dictionary to replace char with bar +for ((i = 0; i < bar_length; i++)); do + dict+=";s/$i/${bar:$i:1}/g" +done + +# Create cava config +config_file="/tmp/bar_cava_config" +cat >"$config_file" <