Hyprland dotfiles
| 1 | #!/bin/bash |
| 2 | # /* ---- ๐ซ https://github.com/JaKooLit ๐ซ ---- */ ## |
| 3 | # Not my own work. This was added through Github PR. Credit to original author |
| 4 | |
| 5 | #----- Optimized bars animation without much CPU usage increase -------- |
| 6 | bar="โโโโโ โโโ" |
| 7 | dict="s/;//g" |
| 8 | |
| 9 | # Calculate the length of the bar outside the loop |
| 10 | bar_length= |
| 11 | |
| 12 | # Create dictionary to replace char with bar |
| 13 | for; do |
| 14 | dict+=";s///g" |
| 15 | done |
| 16 | |
| 17 | # Create cava config |
| 18 | config_file="/tmp/bar_cava_config" |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
| 26 | |
| 27 | |
| 28 | |
| 29 | |
| 30 | |
| 31 | |
| 32 | |
| 33 | |
| 34 | |
| 35 | |
| 36 | |
| 37 | |
| 38 | # Kill cava if it's already running |
| 39 | |
| 40 | |
| 41 | # Read stdout from cava and perform substitution in a single sed command |
| 42 | | |