cava colorizer

This commit is contained in:
2026-02-18 15:03:07 +01:00
parent a2fad850fb
commit 8e3c4e4383
2 changed files with 16 additions and 35 deletions

View File

@@ -12,20 +12,20 @@ pkill -USR2 cava > /dev/null 2>&1
}
mode() {
case "$1" in
solid) sd ".*gradient .*" "gradient = 0" ${CFGFILE};;
gradient) sd ".*gradient .*" "gradient = 1" ${CFGFILE};;
solid) sd "^gradient .*" "gradient = 0" ${CFGFILE};;
gradient) sd "^gradient .*" "gradient = 1" ${CFGFILE};;
esac
#reload_colors
reload_config
}
foregroundcolor(){
sd ".*foreground .*" "foreground = '${1}'" ${CFGFILE}
sd "^foreground .*" "foreground = '${1}'" ${CFGFILE}
}
foreground() {
sd ".*foreground .*" "foreground = '${1}'" ${CFGFILE}
sd ".*gradient .*" "gradient = 0" ${CFGFILE}
sd "^foreground .*" "foreground = '${1}'" ${CFGFILE}
sd "^gradient .*" "gradient = 0" ${CFGFILE}
reload_config
}
gradientcolors() {
@@ -73,13 +73,8 @@ sd "^framerate .*" "framerate = ${1}" ${CFGFILE}
reload_config
}
sensitivity () {
sd "^sensitivity .*" "sensitivity = ${1}" ${CFGFILE}
reload_config
}
gravity () {
sd "^gravity .*" "gravity = ${1}" ${CFGFILE}
noise_reduction () {
sd "^noise_reduction .*" "noise_reduction = ${1}" ${CFGFILE}
reload_config
}
@@ -123,8 +118,7 @@ case "$1" in
bar_width)bar_width "$2";;
bar_spacing)bar_spacing "$2";;
framerate)framerate "$2";;
sensitivity)sensitivity "$2";;
gravity)gravity "$2";;
noise_reduction)noise_reduction "$2";;
resetcfg)resetcfg;;
info) info;;
*):;;