add gh-cli

This commit is contained in:
danny 2024-12-14 16:55:50 +08:00
parent ab917700ee
commit 5b46a0b217
30 changed files with 680 additions and 356 deletions

View file

@ -0,0 +1,32 @@
#!/bin/bash
#Taken from JaKoolit's dotfiles
bar="▁▂▃▄▅▆▇█"
dict="s/;//g"
bar_length=${#bar}
for ((i = 0; i < bar_length; i++)); do
dict+=";s/$i/${bar:$i:1}/g"
done
config_file="/tmp/bar_cava_config"
cat >"$config_file" <<EOF
[general]
bars = 10
[input]
method = pulse
source = auto
[output]
method = raw
raw_target = /dev/stdout
data_format = ascii
ascii_max_range = 7
EOF
pkill -f "cava -p $config_file"
cava -p "$config_file" | sed -u "$dict"