Changes in: waybar,
This commit is contained in:
parent
9872af2f32
commit
9920450b17
3 changed files with 36 additions and 35 deletions
|
@ -18,6 +18,10 @@
|
|||
// "bluetooth",
|
||||
"battery"
|
||||
],
|
||||
"custom/cava": {
|
||||
"format": "{}",
|
||||
"exec": "~/.config/waybar/scripts/cava.sh"
|
||||
},
|
||||
"temperature#gpu": {
|
||||
"thermal-zone": 5,
|
||||
"critical-threshold": 80,
|
||||
|
@ -25,30 +29,6 @@
|
|||
"format": "{temperatureC}°C ",
|
||||
"tooltip": false
|
||||
},
|
||||
"custom/cava": {
|
||||
// "cava_config": "$XDG_CONFIG_HOME/.config/cava/config",
|
||||
"framerate": 30,
|
||||
"autosens": 1,
|
||||
// "sensitivity": 100,
|
||||
"bars": 14,
|
||||
"lower_cutoff_freq": 50,
|
||||
"higher_cutoff_freq": 10000,
|
||||
"method": "pulse",
|
||||
"exec": "~/.config/waybar/scripts/cava.sh",
|
||||
"interval": 0.05,
|
||||
"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"
|
||||
}
|
||||
},
|
||||
"backlight": {
|
||||
"device": "intel_backlight",
|
||||
"scroll-step": 5,
|
||||
|
|
|
@ -1,10 +1,30 @@
|
|||
#!/bin/bash
|
||||
is_cava_ServerExist=`ps -ef|grep -m 1 cava|grep -v "grep"|wc -l`
|
||||
if [ "$is_cava_ServerExist" = "0" ]; then
|
||||
echo "cava_server not found" > /dev/null 2>&1
|
||||
# exit;
|
||||
elif [ "$is_cava_ServerExist" = "1" ]; then
|
||||
killall cava
|
||||
fi
|
||||
#! /bin/bash
|
||||
|
||||
cava -p ~/.config/cava/config | sed -u 's/;//g;s/0/▁/g;s/1/▂/g;s/2/▃/g;s/3/▄/g;s/4/▅/g;s/5/▆/g;s/6/▇/g;s/7/█/g;'
|
||||
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 = 6
|
||||
|
||||
[output]
|
||||
method = raw
|
||||
raw_target = /dev/stdout
|
||||
data_format = ascii
|
||||
ascii_max_range = 5
|
||||
" > $config_file
|
||||
|
||||
# read stdout from cava
|
||||
cava -p $config_file | while read -r line; do
|
||||
echo $line | sed $dict
|
||||
done
|
|
@ -17,9 +17,10 @@
|
|||
color: #8fbc8f;
|
||||
border-left: 0px;
|
||||
border-right: 0px;
|
||||
padding-bottom: 6px;
|
||||
padding: 6px;
|
||||
font-family: 'bargraph';
|
||||
font-size: 22px;
|
||||
background: @raisin-black;
|
||||
margin: 0px 2px;
|
||||
}
|
||||
|
||||
#cpu {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue