cava mod upd, pyradio disabled for now

master 0.9.36
Daniel Napora 2023-05-14 14:34:17 +02:00
parent 5a594efb44
commit ab0f7815d2
7 changed files with 77 additions and 30 deletions

View File

@ -305,10 +305,10 @@ out+=("Conky Manager,^pipe(colorizer-conky)")
#out+=("TINT2,^pipe(colorizer-tint2)")
#out+=("Systray HW monitor,^pipe(colorizer-phwmon)")
if pgrep -f pyradio >/dev/null ;then
out+=("^sep()")
out+=("PyRadio,^pipe(colorizer-pyradio)")
fi
###if pgrep -f pyradio >/dev/null ;then
### out+=("^sep()")
### out+=("PyRadio,^pipe(colorizer-pyradio)")
###fi
if pgrep -f cava >/dev/null ;then
out+=("^sep()")

View File

@ -16,7 +16,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
wmctrl -R cavatransparent
me="colorizer-cava -s"
@ -43,6 +43,13 @@ fi
case "$LANG" in
pl*)
INFO="Cava porady"
INFO_HEAD="Porady dla Cava"
INFO_TXT="\n1. Cava jest uruchomiona w przezroczystym oknie...\n \
Możesz je więc <b>przesuwać</b> lub <b>zmieniać rozmiar</b> tak jak każde inne okno\n \
<i>Przesuwanie</i>: przytrzymaj <b>Alt</b> i przeciągnij\n \
<i>Zmiana rozmiaru</i>: przytrzymaj <b>Alt</b> i przeciągnij prawym przyciskiem myszy\n\n \
2. Użyj strzałek <b> </b>, aby zmienić szerokość słupków"
COLORIZE_CAVA="Pokoloruj Cava"
COLOR="Jednolity kolor"
REVERSE_GRADIENT="Odwróć kolory gradientu"
@ -64,6 +71,13 @@ case "$LANG" in
RELOAD_COLORS="Przeładuj kolory"
;;
*)
INFO="CaVa tips &amp; tricks"
INFO_HEAD="Cava tips & tricks"
INFO_TXT="\n1. Cava runs inside transparent window...\n \
So you can <b>move</b> or <b>resize</b> it like any other window\n \
<i>Move</i>: hold <b>Alt</b> and drag\n \
<i>Resize</i>: hold <b>Alt</b> and drag with right mouse button\n\n \
2. Use arrows <b> </b> to change bar width"
COLORIZE_CAVA="Colorize Cava"
COLOR="Solid Color"
REVERSE_GRADIENT="Reverse gradient's colors"
@ -105,7 +119,7 @@ FGT=$(pastel textcolor ${FGC}|pastel format hex)
}
getvalues
out+=("^sep($COLORIZE_CAVA)")
out+=("<tt><span bgcolor='$FGC' fgcolor='$FGT'> ${FGC} </span></tt> $COLOR,^pipe(mbclr '$FGC' cavactl foreground Cava_Bar_Color '$me')")
out+=("^sep($GRADIENT)")
out+=("<span bgcolor='$GR_FROM'> </span><span bgcolor='$GR_TO'> </span> $PREGRADIENT,^pipe(mbgrad cava)")
@ -116,7 +130,9 @@ FGT=$(pastel textcolor ${FGC}|pastel format hex)
out+=("^sep($COLOR_MODE)")
[[ "$GR" == "0" ]] && out+=("<big>綠</big> $SOLID_COLOR,cavactl mode solid;$me" "<big>󰝦</big> $GRADIENT,cavactl mode gradient;$me") || out+=("<big>󰝦</big> $SOLID_COLOR,cavactl mode solid;$me" "<big>綠</big> $GRADIENT,cavactl mode gradient;$me")
out+=("^sep(<i>$GENERATEFROMWP</i>)")
out+=("<span bgcolor='${w[-3]}'> </span><span bgcolor='${w[3]}'> </span> $LIGHTBG,w2theme cava light;$me")
out+=("<span bgcolor='${w[3]}'> </span><span bgcolor='${w[-3]}'> </span> $DARKBG,w2theme cava dark;$me")
out+=("^sep($BARS)")
out+=("$BAR_WIDTH [ <b>$BW</b> ],^checkout(barwidth)")
out2+=("^tag(barwidth)")
@ -137,9 +153,9 @@ FGT=$(pastel textcolor ${FGC}|pastel format hex)
out+=(" $EDITCONF,xdg-open ~/.config/cava/config")
out+=("󰑓 $RELOAD,cavactl reload;$me")
out+=("󰑓 $RELOAD_COLORS,cavactl reload_colors;$me")
out+=("^sep(<i>$GENERATEFROMWP</i>)")
out+=("<span bgcolor='${w[-3]}'> </span><span bgcolor='${w[3]}'> </span> $LIGHTBG,w2theme cava light;$me")
out+=("<span bgcolor='${w[3]}'> </span><span bgcolor='${w[-3]}'> </span> $DARKBG,w2theme cava dark;$me")
out+=("^sep()")
out+=(" $INFO,notify-send.sh -i music -u critical '$INFO_HEAD' '$INFO_TXT'")
### RUN
if [[ "$1" == "-s" ]]; then

View File

@ -19,12 +19,34 @@
# TODO Start Pyradio if not started
# TODO check if theme is writeable (users themes)
# TODO Save as new theme
PR_WINID=$(wmctrl -lp |grep 'PyRadio: \|PyRadio -'|cut -d' ' -f1)
wmctrl -iR ${PR_WINID}
me="colorizer-pyradio -s"
THEMERC=~/.config/pyradio/themes/mbcolors.pyradio-theme
# get wallpaper color palette
WALLPALDIR="$HOME/.cache/colorizer/palettes"
mkdir -p "$WALLPALDIR"
read WALLPATH<<< $(grep file "$HOME"/.config/nitrogen/bg-saved.cfg | cut -d'=' -f2)
NAME=${WALLPATH////_}
if [[ "${NAME}" =~ ^_home_.* ]]; then
n=${#HOME}
((n++))
NAME=${NAME:${n}}
fi
if [ ! -f "$WALLPALDIR/$NAME.clr" ]; then
convert ${WALLPATH} -resize 25% -colors 16 -unique-colors txt:- |grep -v '^#'| awk '{print substr($3,1,7)}' |pastel sort-by brightness |pastel format hex > "$WALLPALDIR/$NAME.clr"
fi
mapfile -t w < "$WALLPALDIR/$NAME.clr"
if [[ "${#w[@]}" -lt 8 ]]; then
w+=("#2e3440" "#4c566a" "#5e81ac" "#bf616b" "#b48ead" "#a3be8c" "#ebcb8b" "#d8dee9" "#eceff4")
fi
case "$LANG" in
pl*)
COLORIZE_PYRADIO="Pokoloruj PyRadio"
@ -50,7 +72,7 @@ case "$LANG" in
START_PYRADIO="Start PyRadio"
INFO="Info"
INFO_HEAD="How it works?"
INFO_TXT="Automatic theme generation works with <b>mbcolors</b> user theme.\n Configuration:/n- use <b>t</b> key to show theme selection dialog\n- navigate to <i>mbcolors</i> theme and press <b>c</b>\n\n"
INFO_TXT="Automatic theme generation works with <b>mbcolors</b> user theme.\n Configuration:\n- use <b>t</b> key to show theme selection dialog\n- navigate to <i>mbcolors</i> theme and press <b>c</b>\n\n"
GENERATEFROMWP="Generate from wallpaper colors..."
LIGHTBG="Light Background"
DARKBG="Dark Background"
@ -82,10 +104,8 @@ read MB1 MB2 MBFG<<< "$(grep '^Messages Border ' ${THEMERC})"
out+=("^sep($COLORIZE_PYRADIO)")
#out+=("$START_PYRADIO,terminator --geometry=420x440-20-20 -e pyradio")
out+=(" $INFO,notify-send.sh -i music '$INFO_HEAD' '$INFO_TXT' -t 20000")
out+=("^sep(<i>$GENERATEFROMWP</i>)")
out+=("$LIGHTBG,w2theme pyradio light;$me")
out+=("$DARKBG,w2theme pyradio dark;$me")
out+=(" $INFO,notify-send.sh -i pyradio -u critical '$INFO_HEAD' '$INFO_TXT'")
out+=("^sep($SETCOLORS)")
out+=("<tt><span weight='bold' bgcolor='$SBG' fgcolor='$SFG'> AbCd </span></tt> Stations,^checkout(stations)")
out2+=("^tag(stations)")
@ -126,7 +146,9 @@ read MB1 MB2 MBFG<<< "$(grep '^Messages Border ' ${THEMERC})"
out+=(" $RESETTHEME,prtctl resettheme;$me")
out+=("^sep()")
out+=("$EXPORTTHEME,prtctl exp;$me")
out+=("^sep(<i>$GENERATEFROMWP</i>)")
out+=("$LIGHTBG,w2theme pyradio light;$me")
out+=("$DARKBG,w2theme pyradio dark;$me")
out+=("^sep($CONFIG_AND_DOCS)")
#out+=("PyRadio README,cat /usr/share/doc/pyradio/README.html| yad --html --no-buttons --no-escape --height=800 --width=600")
out+=(" $README,xdg-open /usr/share/doc/pyradio/README.html")

View File

@ -430,6 +430,7 @@ randomizer () {
#SHADOW="${SHADOWS[$rand]}"
#shadow "${SHADOW}"
shadow no
### RANDOM GRADIENT COLORS
GRADIENT_FILE="$HOME"/.config/colorizer/gradients_all.inc

View File

@ -6,7 +6,7 @@
THEMERC=~/.config/pyradio/themes/mbcolors.pyradio-theme
CONF_DIR="$HOME/.config/pyradio/"
CONF_FILE="$CONF_DIR/config"
stations() {
sd "^Stations .*$" "Stations $1 $2" ${THEMERC}
@ -115,6 +115,14 @@ PyRadio URL #d2cda1
# Message window border foreground
# (background color will come from Stations)
Messages Border #d3d4bf
# Theme Transparency
# Values are:
# 0: No transparency (default)
# 1: Theme is transparent
# 2: Obey config setting
transparency 0
EOF
}
export_theme () {

View File

@ -61,7 +61,7 @@ nav button.w3-bar-item {padding:4px 12px !important;}
<button class="w3-bar-item w3-button w3-small tablink" onclick="openTab(event, 'Jgmenu')">Menu/Sidepanels</button>
<button class="w3-bar-item w3-button w3-small tablink" onclick="openTab(event, 'Conky')">Conky</button>
<button class="w3-bar-item w3-button w3-small tablink" onclick="openTab(event, 'Wall2theme')">Wallpaper  themes</button>
<button class="w3-bar-item w3-button w3-small tablink" onclick="openTab(event, 'pyradiocava')"><i>Cava, PyRadio</i></button>
<button class="w3-bar-item w3-button w3-small tablink" onclick="openTab(event, 'pyradiocava')"><i>Cava<!--, PyRadio//--></i></button>
<button class="w3-bar-item w3-button w3-small tablink" onclick="openTab(event, 'Tint2')">Tint2 Panel</button>
<button class="w3-bar-item w3-button w3-small tablink" onclick="openTab(event, 'Terminal')">Terminal theme</button>
<button class="w3-bar-item w3-button w3-small tablink" onclick="openTab(event, 'Save')">Save and Restore</button>
@ -542,19 +542,19 @@ You can add <strong>your own commands</strong> to each Conky, which will be show
<section id="pyradiocava" class="w3-container tab" style="display:none;min-height:100vh;">
<div class="fixed">
<div class="w3-bar">
<a class="w3-button w3-bar-item w3-small w3-grey w3-hover-amber w3-right" href="run://colorizer-cava -s">󱕍 Colorizer Cava</a>
<a class="w3-button w3-bar-item w3-small w3-grey w3-hover-amber w3-right" href="run://colorizer-cava -s">󰺢 Colorizer Cava</a>
</div>
</div>
<p><i>These Colorizer modules are optional - that is, they only appear in the Colorizer root menu when the corresponding programs are running.</i></p>
<h3>Cava - Audio Visualizer</h3>
<p>You can turn on audio visualization while listening to music. Click below, to try different options (numbers means height in pixels)</p>
<p>Full screen width: <a class="w3-tag w3-amber" href="run://mb-music cavastart 200 full">200</a> <a class="w3-tag w3-amber" href="run://mb-music cavastart 100 full">100</a> <a class="w3-tag w3-amber" href="run://mb-music cavastart 50 full">50</a> or half screen width: <a class="w3-tag w3-amber" href="run://mb-music cavastart 200 half">200</a> <a class="w3-tag w3-amber" href="run://mb-music cavastart 100 half">100</a> <a class="w3-tag w3-amber" href="run://mb-music cavastart 50 half">50</a></p>
<p>Use Colorizer <a class="w3-tag w3-small w3-orange" href="run://colorizer-cava -s"> 󱕍 Cava module </a> to fine-tune colors, gradients and bars.</p>
<p>Use Colorizer <a class="w3-tag w3-small w3-orange" href="run://colorizer-cava -s">󰺢 Cava module </a> to fine-tune colors, gradients and bars.</p>
<div class="w3-panel w3-dark-grey w3-rightbar w3-border-black w3-border" style="margin-top:-2px;">
<p><a class="w3-tag w3-teal" href="run://mb-music -s">Music & Sound</a> dynamic menu can serve as basic, lightweight music player (mpv-based) you might like to try. <i>Also available from panel's volume icon - right click</i></p>
<p><a class="w3-tag w3-teal" href="run://mb-music -s">󰕾 Music & Sound</a> dynamic menu can serve as basic, lightweight music player (mpv-based) you might like to try. <i>Also available from panel's volume icon - right click</i></p>
</div>
<h3>PyRadio - Internet Radio</h3>
<!--<h3>PyRadio - Internet Radio</h3>
<div class="w3-row">
<div class="w3-twothird">
@ -579,7 +579,7 @@ You can add <strong>your own commands</strong> to each Conky, which will be show
</div>
</div>
</div>
</div>
</div>//-->
</section>
<section id="Terminal" class="w3-container tab" style="display:none;min-height:100vh">

View File

@ -62,7 +62,7 @@ nav button.w3-bar-item {padding:4px 12px !important;}
<button class="w3-bar-item w3-button w3-small tablink" onclick="openTab(event, 'Jgmenu')">Menu/Panele Boczne</button>
<button class="w3-bar-item w3-button w3-small tablink" onclick="openTab(event, 'Conky')">Conky</button>
<button class="w3-bar-item w3-button w3-small tablink" onclick="openTab(event, 'Wall2theme')">Kolory z tapety</button>
<button class="w3-bar-item w3-button w3-small tablink" onclick="openTab(event, 'pyradiocava')"><i>Cava, PyRadio</i></button>
<button class="w3-bar-item w3-button w3-small tablink" onclick="openTab(event, 'pyradiocava')"><i>Cava<!--, PyRadio//--></i></button>
<button class="w3-bar-item w3-button w3-small tablink" onclick="openTab(event, 'Tint2')">Panel Tint2</button>
<button class="w3-bar-item w3-button w3-small tablink" onclick="openTab(event, 'Terminal')">Kolory Terminala</button>
<button class="w3-bar-item w3-button w3-small tablink" onclick="openTab(event, 'Save')">Zapisywanie</button>
@ -554,19 +554,19 @@ Do każdego Conky możesz dodać <strong>własne polecenia</strong>, które zost
<section id="pyradiocava" class="w3-container tab" style="display:none;min-height:100vh;">
<div class="fixed">
<div class="w3-bar">
<a class="w3-button w3-bar-item w3-small w3-grey w3-hover-amber w3-right" href="run://colorizer-cava -s">󱕍 Colorizer Cava</a>
<a class="w3-button w3-bar-item w3-small w3-grey w3-hover-amber w3-right" href="run://colorizer-cava -s">󰺢 Colorizer Cava</a>
</div>
</div>
<p><i>Te moduły Colorizera są opcjonalne - to znaczy pojawiają się w menu głównym Colorizera tylko wtedy, gdy uruchomione są odpowiednie programy.</i></p>
<h3>Cava - wizualizacja dźwięku</h3>
<p>Możesz włączyć wizualizację audio podczas słuchania muzyki. Kliknij poniżej, aby wypróbować różne opcje (liczby oznaczają wysokość w pikselach)</p>
<p>Pełna szerokość: <a class="w3-tag w3-amber" href="run://mb-music cavastart 200 full">200</a> <a class="w3-tag w3-amber" href="run://mb-music cavastart 100 full">100</a> <a class="w3-tag w3-amber" href="run://mb-music cavastart 50 full">50</a> lub połowa szerokości ekranu: <a class="w3-tag w3-amber" href="run://mb-music cavastart 200 half">200</a> <a class="w3-tag w3-amber" href="run://mb-music cavastart 100 half">100</a> <a class="w3-tag w3-amber" href="run://mb-music cavastart 50 half">50</a></p>
<p>Użyj <a class="w3-tag w3-small w3-orange" href="run://colorizer-cava -s"> 󱕍 Modułu Cava</a> aby ustawiać gradienty, zmieniać kolory, szerokość i odstęp między słupkami.</p>
<p>Użyj <a class="w3-tag w3-small w3-orange" href="run://colorizer-cava -s"> 󰺢 Modułu Cava</a> aby ustawiać gradienty, zmieniać kolory, szerokość i odstęp między słupkami.</p>
<div class="w3-panel w3-dark-grey w3-rightbar w3-border-black w3-border" style="margin-top:-2px;">
<p>Dynamiczne menu <a class="w3-tag w3-teal" href="run://mb-music -s">Muzyka & Dźwięk</a> może służyć jako prosty i lekki odtwarzacz (bazujący na mpv). <i>Dostępny także pod prawym klikiem na ikonie dźwięku w panelu.</i></p>
<p>Dynamiczne menu <a class="w3-tag w3-teal" href="run://mb-music -s">󰕾 Muzyka & Dźwięk</a> może służyć jako prosty i lekki odtwarzacz (bazujący na mpv). <i>Dostępny także pod prawym klikiem na ikonie dźwięku w panelu.</i></p>
</div>
<h3>PyRadio - Radio internetowe</h3>
<!-- <h3>PyRadio - Radio internetowe</h3>
<div class="w3-row">
<div class="w3-twothird">
@ -591,7 +591,7 @@ Do każdego Conky możesz dodać <strong>własne polecenia</strong>, które zost
</div>
</div>
</div>
</div>
</div> //-->
</section>
<section id="Terminal" class="w3-container tab" style="display:none;min-height:100vh">