diff options
| author | Ja.KooLit <ejhay.games@gmail.com> | 2023-12-29 21:33:06 +0900 |
|---|---|---|
| committer | Ja.KooLit <ejhay.games@gmail.com> | 2023-12-29 21:33:06 +0900 |
| commit | 8e4bdc65ca9a2af0726c2cc1249ba87bfb70437c (patch) | |
| tree | 8dc8be503a05b79126e2f52caed84a8400e24577 /config | |
| parent | ce6bcd4284e00d911968354421af16d81a623d48 (diff) | |
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
Diffstat (limited to 'config')
31 files changed, 130 insertions, 160 deletions
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" <<EOF +[general] +bars = 10 + +[output] +method = raw +raw_target = /dev/stdout +data_format = ascii +ascii_max_range = 7 +EOF + +# Read stdout from cava and perform substitution in a single sed command +cava -p "$config_file" | sed -u "$dict" diff --git a/config/hypr/scripts/waybar_cava.sh b/config/hypr/scripts/waybar_cava.sh deleted file mode 100755 index 2ecc4d0b..00000000 --- a/config/hypr/scripts/waybar_cava.sh +++ /dev/null @@ -1,59 +0,0 @@ -# #! /bin/bash - -# --------------------Smooth bars animation with 1-2% increase in CPU usage ------------------- -# 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 - -# # write cava config -# config_file="/tmp/polybar_cava_config" -# echo " -# [general] -# bars = 10 - -# [output] -# method = raw -# raw_target = /dev/stdout -# data_format = ascii -# ascii_max_range = 7 -# " > $config_file - -# # read stdout from cava -# cava -p $config_file | while read -r line; do -# echo $line | sed $dict -# done - -# --------------------Optimized bars animation with 1-2% increase in CPU usage ------------------- -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/polybar_cava_config" -cat >"$config_file" <<EOF -[general] -bars = 10 - -[output] -method = raw -raw_target = /dev/stdout -data_format = ascii -ascii_max_range = 7 -EOF - -# Read stdout from cava and perform substitution in a single sed command -cava -p "$config_file" | sed -u "$dict" diff --git a/config/waybar/configs/[BOT] Default b/config/waybar/configs/[BOT] Default index eece9165..6cf3dd64 100644 --- a/config/waybar/configs/[BOT] Default +++ b/config/waybar/configs/[BOT] Default @@ -25,6 +25,8 @@ "memory", "custom/separator#dot-line", "custom/weather", + "custom/separator#blank_3", + "custom/cava_mviz", ], "modules-center": [ diff --git a/config/waybar/configs/[BOT] Default Laptop b/config/waybar/configs/[BOT] Default Laptop index 1268408b..501e0c85 100644 --- a/config/waybar/configs/[BOT] Default Laptop +++ b/config/waybar/configs/[BOT] Default Laptop @@ -25,6 +25,8 @@ "memory", "custom/separator#dot-line", "custom/weather", + "custom/separator#blank_3", + "custom/cava_mviz", ], "modules-center": [ diff --git a/config/waybar/configs/[TOP] Default b/config/waybar/configs/[TOP] Default index af1dfa83..8ab71d6c 100644 --- a/config/waybar/configs/[TOP] Default +++ b/config/waybar/configs/[TOP] Default @@ -25,8 +25,8 @@ "memory", "custom/separator#dot-line", "custom/weather", - "custom/separator#dot-line", - "custom/mviz", + "custom/separator#blank_3", + "custom/cava_mviz", ], "modules-center": [ diff --git a/config/waybar/configs/[TOP] Default Laptop b/config/waybar/configs/[TOP] Default Laptop index 89f6bbbd..654fe5c6 100644 --- a/config/waybar/configs/[TOP] Default Laptop +++ b/config/waybar/configs/[TOP] Default Laptop @@ -25,6 +25,8 @@ "memory", "custom/separator#dot-line", "custom/weather", + "custom/separator#blank_3", + "custom/cava_mviz", ], "modules-center": [ diff --git a/config/waybar/modules b/config/waybar/modules index 919076b2..1165211a 100644 --- a/config/waybar/modules +++ b/config/waybar/modules @@ -215,30 +215,7 @@ "tooltip": true, "on-click": "blueman-manager", }, - -"cava": { - //"cava_config": "$XDG_CONFIG_HOME/cava/cava.conf", - "framerate": 30, - "autosens": 1, - "sensitivity": 100, - "bars": 14, - "lower_cutoff_freq": 50, - "higher_cutoff_freq": 10000, - "method": "pulse", - "source": "auto", - "stereo": true, - "reverse": false, - "bar_delimiter": 0, - "monstercat": false, - "waves": false, - "noise_reduction": 0.77, - "input_delay": 2, - "format-icons" : ["▁", "▂", "▃", "▄", "▅", "▆", "▇", "█" ], - "actions": { - "on-click-right": "mode" - } -}, - + "clock": { "interval": 1, //"format": " {:%I:%M %p}", // AM PM format @@ -530,6 +507,12 @@ "on-click-middle": "~/.config/hypr/scripts/WallpaperSelect.sh", "on-click-right": "~/.config/hypr/scripts/WaybarLayout.sh", }, + +// This is a custom cava visualizer +"custom/cava_mviz": { + "exec": "~/.config/hypr/scripts/WaybarCava.sh", + "format": "{}" +}, "custom/playerctl": { "format": "<span>{}</span>", @@ -545,6 +528,15 @@ "smooth-scrolling-threshold": 1, }, +"custom/power": { + "format": "⏻ ", + "exec": "echo ; echo power // blur", + "on-click": "~/.config/hypr/scripts/Wlogout.sh", + "on-click-right": "~/.config/hypr/scripts/ChangeBlur.sh", + "interval" : 86400, // once every day + "tooltip": true, +}, + "custom/swaync": { "tooltip":true, "format": "{icon} {}", @@ -565,21 +557,7 @@ "on-click-right": "swaync-client -d -sw", "escape": true, }, - -"custom/power": { - "format": "⏻ ", - "exec": "echo ; echo power // blur", - "on-click": "~/.config/hypr/scripts/Wlogout.sh", - "on-click-right": "~/.config/hypr/scripts/ChangeBlur.sh", - "interval" : 86400, // once every day - "tooltip": true, -}, - -"custom/mviz": { - "exec": "~/.config/hypr/scripts/waybar_cava.sh", - "format": "{}" - }, - + // NOTE:! This is only for Arch and Arch Based Distros "custom/updater":{ "format": " {}", @@ -632,6 +610,12 @@ "interval": "once", "tooltip": false }, + +"custom/separator#blank_3": { + "format": " ", + "interval": "once", + "tooltip": false +}, // Modules below are for vertical layout diff --git a/config/waybar/style/Catppuccin-Latte.css b/config/waybar/style/Catppuccin-Latte.css index 18b16633..187dac2f 100644 --- a/config/waybar/style/Catppuccin-Latte.css +++ b/config/waybar/style/Catppuccin-Latte.css @@ -48,7 +48,6 @@ window#waybar.hidden { #backlight-slider, #battery, #bluetooth, -#cava, #clock, #cpu, #disk, @@ -96,15 +95,15 @@ window#waybar.hidden { } #idle_inhibitor { - color: @blue; + color: @blue; } #backlight { - color: @blue; + color: @blue; } #battery { - color: @green; + color: @green; } @keyframes blink { @@ -114,14 +113,14 @@ window#waybar.hidden { } #battery.critical:not(.charging) { - background-color: @red; - color: @theme_text_color; - animation-name: blink; - animation-duration: 0.5s; - animation-timing-function: linear; - animation-iteration-count: infinite; - animation-direction: alternate; - box-shadow: inset 0 -3px transparent; + background-color: @red; + color: @theme_text_color; + animation-name: blink; + animation-duration: 0.5s; + animation-timing-function: linear; + animation-iteration-count: infinite; + animation-direction: alternate; + box-shadow: inset 0 -3px transparent; } #bluetooth { @@ -129,28 +128,28 @@ window#waybar.hidden { } #clock { - color: @yellow; + color: @yellow; } #cpu { - color: @green; + color: @green; } #custom-keyboard, #memory { - color: @sky; + color: @sky; } #disk { - color: @sapphire; + color: @sapphire; } #temperature { - color: @teal; + color: @teal; } #temperature.critical { - background-color: @red; + background-color: @red; } #tray > .passive { @@ -161,7 +160,7 @@ window#waybar.hidden { } #keyboard-state { - color: @flamingo; + color: @flamingo; } #workspaces button { @@ -217,57 +216,60 @@ window#waybar.hidden { animation: gradient_f 20s ease-in infinite; transition: all 0.3s cubic-bezier(.55,-0.68,.48,1.682); } +#custom-cava_mviz { + color: @pink; +} #custom-menu { - color: @rosewater; + color: @rosewater; } #custom-power { - color: @red; + color: @red; } #custom-updater { - color: @red; + color: @red; } #custom-light_dark { - color: @blue; + color: @blue; } #custom-weather { - color: @lavender; + color: @lavender; } #custom-lock { - color: @maroon; + color: @maroon; } #pulseaudio { - color: @sapphire; + color: @sapphire; } #pulseaudio.bluetooth { - color: @pink; + color: @pink; } #pulseaudio.muted { - color: @red; + color: @red; } #window { - color: @mauve; + color: @mauve; } #custom-waybar-mpris { - color:@lavender; + color:@lavender; } #network { - color: @teal; + color: @teal; } #network.disconnected, #network.disabled { - background-color: @surface0; - color: @text; + background-color: @surface0; + color: @text; } #pulseaudio-slider slider { min-width: 0px; diff --git a/config/waybar/style/Catppuccin-Mocha.css b/config/waybar/style/Catppuccin-Mocha.css index 061106c5..5f74fe8c 100644 --- a/config/waybar/style/Catppuccin-Mocha.css +++ b/config/waybar/style/Catppuccin-Mocha.css @@ -54,7 +54,6 @@ window#waybar.hidden { #backlight-slider, #battery, #bluetooth, -#cava, #clock, #cpu, #disk, @@ -221,6 +220,10 @@ window#waybar.hidden { transition: all 0.3s cubic-bezier(.55,-0.68,.48,1.682); } +#custom-cava_mviz { + color: @pink; +} + #custom-menu { color: @rosewater; } diff --git a/config/waybar/style/Crimson.css b/config/waybar/style/Crimson.css index fcac5dc1..d08b53fe 100644 --- a/config/waybar/style/Crimson.css +++ b/config/waybar/style/Crimson.css @@ -110,7 +110,6 @@ tooltip { #backlight-slider, #battery, #bluetooth, -#cava, #clock, #cpu, #disk, diff --git a/config/waybar/style/Purpl.css b/config/waybar/style/Purpl.css index 0f97470f..2e0e4f8f 100644 --- a/config/waybar/style/Purpl.css +++ b/config/waybar/style/Purpl.css @@ -120,7 +120,6 @@ tooltip { #backlight-slider, #battery, #bluetooth, -#cava, #clock, #cpu, #disk, @@ -139,6 +138,7 @@ tooltip { #wireplumber, #workspaces, #custom-backlight, +#custom-cava_mviz, #custom-cycle_wall, #custom-keybinds, #custom-keyboard, diff --git a/config/waybar/style/Rose Pine.css b/config/waybar/style/Rose Pine.css index f055b3b7..bc9b202a 100644 --- a/config/waybar/style/Rose Pine.css +++ b/config/waybar/style/Rose Pine.css @@ -101,7 +101,6 @@ tooltip { #backlight-slider, #battery, #bluetooth, -#cava, #clock, #cpu, #disk, @@ -129,7 +128,7 @@ tooltip { #custom-swaync, #custom-updater, #custom-swaync, -#custom-mviz, +#custom-cava_mviz, #custom-weather, #custom-weather.clearNight, #custom-weather.cloudyFoggyDay, diff --git a/config/waybar/style/Simple Pink.css b/config/waybar/style/Simple Pink.css index d306dd84..e60e275b 100644 --- a/config/waybar/style/Simple Pink.css +++ b/config/waybar/style/Simple Pink.css @@ -124,7 +124,6 @@ tooltip { #backlight-slider, #battery, #bluetooth, -#cava, #clock, #cpu, #disk, @@ -144,6 +143,7 @@ tooltip { #wireplumber, #workspaces, #custom-backlight, +#custom-cava_mviz, #custom-cycle_wall, #custom-keybinds, #custom-keyboard, diff --git a/config/waybar/style/[Black & White] Monochrome.css b/config/waybar/style/[Black & White] Monochrome.css index 143e887b..6c2af3c7 100644 --- a/config/waybar/style/[Black & White] Monochrome.css +++ b/config/waybar/style/[Black & White] Monochrome.css @@ -109,7 +109,6 @@ tooltip label{ #backlight-slider, #battery, #bluetooth, -#cava, #clock, #cpu, #disk, diff --git a/config/waybar/style/[Bordered Pywal] Chroma Fusion Edge.css b/config/waybar/style/[Bordered Pywal] Chroma Fusion Edge.css index 1a29c409..5c99c520 100644 --- a/config/waybar/style/[Bordered Pywal] Chroma Fusion Edge.css +++ b/config/waybar/style/[Bordered Pywal] Chroma Fusion Edge.css @@ -51,7 +51,6 @@ window#waybar.empty #window { #backlight-slider, #battery, #bluetooth, -#cava, #clock, #cpu, #disk, @@ -150,6 +149,9 @@ window#waybar.empty #window { color: @teal; } +#custom-cava_mviz{ + color: @color2; +} #workspaces { margin: 1px 1px 1px 1px; padding: 0px 1px; diff --git a/config/waybar/style/[Colored] Chroma Glow.css b/config/waybar/style/[Colored] Chroma Glow.css index f324bf3a..dcb5bbc8 100644 --- a/config/waybar/style/[Colored] Chroma Glow.css +++ b/config/waybar/style/[Colored] Chroma Glow.css @@ -97,7 +97,6 @@ tooltip label{ #backlight-slider, #battery, #bluetooth, -#cava, #clock, #cpu, #disk, diff --git a/config/waybar/style/[Colored] Translucent.css b/config/waybar/style/[Colored] Translucent.css index 0e3cbaf5..49f8dbf0 100644 --- a/config/waybar/style/[Colored] Translucent.css +++ b/config/waybar/style/[Colored] Translucent.css @@ -111,7 +111,6 @@ tooltip label{ #backlight-slider, #battery, #bluetooth, -#cava, #clock, #cpu, #disk, diff --git a/config/waybar/style/[Colorful] Aurora Blossom.css b/config/waybar/style/[Colorful] Aurora Blossom.css index 8a0f8522..3dd64b45 100644 --- a/config/waybar/style/[Colorful] Aurora Blossom.css +++ b/config/waybar/style/[Colorful] Aurora Blossom.css @@ -97,7 +97,6 @@ tooltip label{ #backlight-slider, #battery, #bluetooth, -#cava, #clock, #cpu, #disk, diff --git a/config/waybar/style/[Colorful] Aurora.css b/config/waybar/style/[Colorful] Aurora.css index a5e57cbd..c841c906 100644 --- a/config/waybar/style/[Colorful] Aurora.css +++ b/config/waybar/style/[Colorful] Aurora.css @@ -88,7 +88,6 @@ tooltip label{ #backlight-slider, #battery, #bluetooth, -#cava, #clock, #cpu, #disk, @@ -107,6 +106,7 @@ tooltip label{ #wireplumber, #workspaces, #custom-backlight, +#custom-cava_mviz, #custom-cycle_wall, #custom-keybinds, #custom-keyboard, diff --git a/config/waybar/style/[Colorful] Rainbow Spectrum.css b/config/waybar/style/[Colorful] Rainbow Spectrum.css index 333f798a..8caa5cb8 100644 --- a/config/waybar/style/[Colorful] Rainbow Spectrum.css +++ b/config/waybar/style/[Colorful] Rainbow Spectrum.css @@ -52,7 +52,6 @@ tooltip label{ #backlight-slider, #battery, #bluetooth, -#cava, #clock, #cpu, #disk, @@ -138,6 +137,10 @@ tooltip label{ background-color: #a6e3a1; } +#mpris { + background-color: #fab387; + color: black; +} #custom-keyboard, #keyboard-state, #keyboard-state label, diff --git a/config/waybar/style/[Dark] Golden Noir.css b/config/waybar/style/[Dark] Golden Noir.css index 667b06e7..75ba82b7 100644 --- a/config/waybar/style/[Dark] Golden Noir.css +++ b/config/waybar/style/[Dark] Golden Noir.css @@ -123,7 +123,6 @@ tooltip { #backlight-slider, #battery, #bluetooth, -#cava, #clock, #cpu, #disk, @@ -142,6 +141,7 @@ tooltip { #wireplumber, #workspaces, #custom-backlight, +#custom-cava_mviz, #custom-cycle_wall, #custom-keybinds, #custom-keyboard, diff --git a/config/waybar/style/[Dark] Obsidian Edge.css b/config/waybar/style/[Dark] Obsidian Edge.css index 8d21d72d..be74c6be 100644 --- a/config/waybar/style/[Dark] Obsidian Edge.css +++ b/config/waybar/style/[Dark] Obsidian Edge.css @@ -116,7 +116,6 @@ tooltip label { #backlight-slider, #battery, #bluetooth, -#cava, #clock, #cpu, #disk, @@ -135,6 +134,7 @@ tooltip label { #wireplumber, #workspaces, #custom-backlight, +#custom-cava_mviz, #custom-cycle_wall, #custom-keybinds, #custom-keyboard, diff --git a/config/waybar/style/[Light] Monochrome Contrast.css b/config/waybar/style/[Light] Monochrome Contrast.css index 34b579f9..25ccf5c7 100644 --- a/config/waybar/style/[Light] Monochrome Contrast.css +++ b/config/waybar/style/[Light] Monochrome Contrast.css @@ -110,7 +110,6 @@ tooltip label{ #backlight-slider, #battery, #bluetooth, -#cava, #clock, #cpu, #disk, diff --git a/config/waybar/style/[Light] Obsidian Glow.css b/config/waybar/style/[Light] Obsidian Glow.css index cd939b5d..f95daa0f 100644 --- a/config/waybar/style/[Light] Obsidian Glow.css +++ b/config/waybar/style/[Light] Obsidian Glow.css @@ -85,7 +85,6 @@ tooltip label { #backlight-slider, #battery, #bluetooth, -#cava, #clock, #cpu, #disk, @@ -104,6 +103,7 @@ tooltip label { #wireplumber, #workspaces, #custom-backlight, +#custom-cava_mviz, #custom-cycle_wall, #custom-keybinds, #custom-keyboard, diff --git a/config/waybar/style/[Pywal] Chroma Edge.css b/config/waybar/style/[Pywal] Chroma Edge.css index 282057c8..ba4e83ab 100644 --- a/config/waybar/style/[Pywal] Chroma Edge.css +++ b/config/waybar/style/[Pywal] Chroma Edge.css @@ -90,7 +90,6 @@ tooltip label{ #backlight-slider, #battery, #bluetooth, -#cava, #clock, #cpu, #disk, diff --git a/config/waybar/style/[Pywal] Chroma Fusion.css b/config/waybar/style/[Pywal] Chroma Fusion.css index 3f15037f..b1006398 100644 --- a/config/waybar/style/[Pywal] Chroma Fusion.css +++ b/config/waybar/style/[Pywal] Chroma Fusion.css @@ -50,7 +50,6 @@ window#waybar.empty #window { #backlight-slider, #battery, #bluetooth, -#cava, #clock, #cpu, #disk, @@ -143,6 +142,10 @@ window#waybar.empty #window { color: @lavender; } +#custom-cava_mviz { + color: @color2; +} + #custom-lock, #idle_inhibitor { color: @teal; diff --git a/config/waybar/style/[Pywal] Chroma Tally.css b/config/waybar/style/[Pywal] Chroma Tally.css index c3a38fb6..ace2ea35 100644 --- a/config/waybar/style/[Pywal] Chroma Tally.css +++ b/config/waybar/style/[Pywal] Chroma Tally.css @@ -55,7 +55,6 @@ window#waybar { #backlight-slider, #battery, #bluetooth, -#cava, #clock, #cpu, #disk, @@ -203,11 +202,15 @@ window#waybar { #custom-lock, #bluetooth{ - color:#d08770; + color:#d08770; } - + +#custom-cava_mviz{ + color: @color2; +} + #custom-weather{ - color:#d08770; + color:#d08770; } #taskbar button.active { diff --git a/config/waybar/style/[Pywal] Colored.css b/config/waybar/style/[Pywal] Colored.css index afb01280..aeccffb9 100644 --- a/config/waybar/style/[Pywal] Colored.css +++ b/config/waybar/style/[Pywal] Colored.css @@ -117,7 +117,6 @@ tooltip { #backlight-slider, #battery, #bluetooth, -#cava, #clock, #cpu, #disk, @@ -136,6 +135,7 @@ tooltip { #wireplumber, #workspaces, #custom-backlight, +#custom-cava_mviz, #custom-cycle_wall, #custom-keybinds, #custom-keyboard, @@ -236,4 +236,8 @@ tooltip { #backlight-slider highlight { min-width: 10px; border-radius: 5px; +} + +#custom-cava_mviz { + padding-right: 10px; }
\ No newline at end of file diff --git a/config/waybar/style/[Pywal] Simple.css b/config/waybar/style/[Pywal] Simple.css index 6acef45e..138e926b 100644 --- a/config/waybar/style/[Pywal] Simple.css +++ b/config/waybar/style/[Pywal] Simple.css @@ -104,7 +104,6 @@ tooltip { #backlight-slider, #battery, #bluetooth, -#cava, #clock, #cpu, #disk, @@ -124,6 +123,7 @@ tooltip { #wireplumber, #workspaces, #custom-backlight, +#custom-cava_mviz, #custom-cycle_wall, #custom-keybinds, #custom-keyboard, diff --git a/config/waybar/style/[Retro] Simple Style.css b/config/waybar/style/[Retro] Simple Style.css index aaf14d62..ea13145e 100644 --- a/config/waybar/style/[Retro] Simple Style.css +++ b/config/waybar/style/[Retro] Simple Style.css @@ -47,7 +47,6 @@ window#waybar { #backlight-slider, #battery, #bluetooth, -#cava, #clock, #cpu, #disk, diff --git a/config/waybar/style/[Transparent] Crystal Clear.css b/config/waybar/style/[Transparent] Crystal Clear.css index 3f64235d..0f9b1760 100644 --- a/config/waybar/style/[Transparent] Crystal Clear.css +++ b/config/waybar/style/[Transparent] Crystal Clear.css @@ -97,7 +97,6 @@ tooltip { #backlight, #battery, #bluetooth, -#cava, #clock, #cpu, #disk, |
