From af889291cf700e27e2c771f1b2c73901d9d473d8 Mon Sep 17 00:00:00 2001 From: Daniel Napora Date: Fri, 23 Dec 2022 13:48:01 +0100 Subject: [PATCH] upd --- bin/colorizer | 18 ++++++++++++++++-- bin/colorizer-ob | 9 +++++++++ bin/colorizer-pyradio | 2 +- bin/w2theme | 27 +++++++++++---------------- share/mabox-colorizer/help/en.html | 29 +++++++++++++++++++++++++++-- share/mabox-colorizer/help/pl.html | 28 ++++++++++++++++++++++++++-- 6 files changed, 90 insertions(+), 23 deletions(-) diff --git a/bin/colorizer b/bin/colorizer index daeadd8..d7ef851 100755 --- a/bin/colorizer +++ b/bin/colorizer @@ -25,6 +25,8 @@ if [ ! -f $CNF_FILE ]; then cat < ${CNF_FILE} # Autogenerate color themes on wallpaper change? yes or no wall2themes=no +# OB window decoration preferred color style: dark, light or none +wall2themes_ob=light # conky preffered bg color dark, light or none (none = not generate/change colorscheme) wall2themes_conky=dark # Menu prefferred bg color dark, light or none (not generate/change colorscheme) @@ -104,6 +106,7 @@ case "$LANG" in COLORIZER_SETTINGS="Ustawienia Colorizera" AUTOGEN_THEMES="Autogenerowanie motywów?" GENERATETHEMES="Generować motywy po zmianie tapety?" + GENOB="Pokolorować Dekoracje Okien?" GENMENU="Pokolorować menu i panele?" GENCONKY="Pokolorować Conky?" GENPYRADIO="Pokolorować PyRadio?" @@ -196,6 +199,7 @@ case "$LANG" in COLORIZER_SETTINGS="Colorizer Settings" AUTOGEN_THEMES="Autogenerate themes?" GENERATETHEMES="Generate themes on wallpaper change?" + GENOB="Colorize Window Decorations?" GENMENU="Colorize Menus and Panels?" GENCONKY="Colorize Conky?" GENPYRADIO="Colorize PyRadio?" @@ -543,6 +547,16 @@ out3+=("^sep($GENERATETHEMES)") out3+=("$YES,mb-setvar wall2themes=yes $CNF_FILE;colorizer -s") out3+=("$NO,mb-setvar wall2themes=no $CNF_FILE;colorizer -s") out2+=("^sep()") + +out2+=("$OBTHEME [ ${wall2themes_ob} ],^checkout(ob)") +out3+=("^tag(ob)") +out3+=("^sep($GENOB)") +out3+=("$NO,mb-setvar wall2themes_ob=none $CNF_FILE;colorizer -s") +out3+=("^sep()") +out3+=("$LIGHTBG,mb-setvar wall2themes_ob=light $CNF_FILE;colorizer -s") +out3+=("$DARKBG,mb-setvar wall2themes_ob=dark $CNF_FILE;colorizer -s") + + out2+=("$MENUPANELS [ ${wall2themes_menu} ],^checkout(mp)") out3+=("^tag(mp)") out3+=("^sep($GENMENU)") @@ -550,7 +564,7 @@ out3+=("$NO,mb-setvar wall2themes_menu=none $CNF_FILE;colorizer -s") out3+=("^sep()") out3+=("$LIGHTBG,mb-setvar wall2themes_menu=light $CNF_FILE;colorizer -s") out3+=("$DARKBG,mb-setvar wall2themes_menu=dark $CNF_FILE;colorizer -s") -out2+=("^sep()") + out2+=("Conky [ ${wall2themes_conky} ],^checkout(conky)") out3+=("^tag(conky)") @@ -565,7 +579,7 @@ out3+=("$DARKBG,mb-setvar wall2themes_conky=dark $CNF_FILE;colorizer -s") #out3+=("$YES,mb-setvar conky_diff_colors=yes $CNF_FILE;colorizer -s") #out3+=("$NO,mb-setvar conky_diff_colors=no $CNF_FILE;colorizer -s") -out2+=("^sep()") + out2+=("PyRadio [ ${wall2themes_pyradio} ],^checkout(pyradio)") out3+=("^tag(pyradio)") out3+=("^sep($GENPYRADIO)") diff --git a/bin/colorizer-ob b/bin/colorizer-ob index f43cafc..97e3887 100755 --- a/bin/colorizer-ob +++ b/bin/colorizer-ob @@ -22,6 +22,9 @@ me="colorizer-ob -s" case "$LANG" in pl*) OBTHEME_LBL="Motyw OpenBox" + GENERATEFROMWP="Generuj z kolorów tapety..." + LIGHTBG="Jasne tło" + DARKBG="Ciemne tło" TITLEBAR="Pasek tytułowy" ACTIVE_BG="Tło aktywnego okna" INACTIVE_BG="Tło nieaktywnego okna" @@ -74,6 +77,9 @@ case "$LANG" in ;; *) OBTHEME_LBL="OpenBox theme" + GENERATEFROMWP="Generate from wallpaper colors..." + LIGHTBG="Light Background" + DARKBG="Dark Background" TITLEBAR="Title Bar" ACTIVE_BG="Active Background" INACTIVE_BG="Inactive Background" @@ -183,6 +189,9 @@ getvalues () { getvalues out+=("^sep($OBTHEME_LBL: $OBTHEME)") +out+=("^sep($GENERATEFROMWP)") + out+=("$LIGHTBG,w2theme pyradio light;$me") + out+=("$DARKBG,w2theme pyradio dark;$me") out+=("^sep($TITLEBAR)") out+=(" $ACTIVE_BG,^pipe(mbclr '$ABG' obtctl clractivebg '${ACTIVE_BG}' '$me')") [[ ! -z "$ABGTO" ]] && out+=(" $ACTIVE_BG_TO,^pipe(mbclr '$ABGTO' obtctl clractivebgto '${ACTIVE_BG_TO}' '$me')") diff --git a/bin/colorizer-pyradio b/bin/colorizer-pyradio index 96a6448..48d6f5c 100755 --- a/bin/colorizer-pyradio +++ b/bin/colorizer-pyradio @@ -67,7 +67,7 @@ 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($GENERATEFROMWP)") + out+=("^sep($GENERATEFROMWP)") out+=("$LIGHTBG,w2theme pyradio light;$me") out+=("$DARKBG,w2theme pyradio dark;$me") out+=("^sep($SETCOLORS)") diff --git a/bin/w2theme b/bin/w2theme index 4416dd8..2467d3e 100755 --- a/bin/w2theme +++ b/bin/w2theme @@ -273,18 +273,12 @@ colorize () { *) : ;; esac # Openbox (TUTAJ WARUNEK) - obtctl clractivebg ${w[3]} - TITLE_FG=$(pastel textcolor ${w[3]}|pastel format hex) - if [[ "$TITLE_FG" == *"ffffff"* ]];then - obtctl activetextcolor ${w[-1]} - obtctl activebuttonscolors ${w[-1]} - else - obtctl activetextcolor ${w[0]} - obtctl activebuttonscolors ${w[0]} - fi - obtctl clractivebgto ${w[4]} - obtctl clrnormalbg ${w[0]} - obtctl clrnormalbgto "$(pastel darken 0.1 "${w[0]}"|pastel format hex)" + case "$wall2themes_ob" in + dark) obtheme dark;; + light) obtheme light;; + *) : ;; + esac + # PYRADIO THEME case "$wall2themes_pyradio" in dark) pyradio_theme dark;; @@ -322,10 +316,11 @@ reverse () { *) : ;; esac # Openbox (TUTAJ WARUNEK) - obtctl clractivebg ${w[3]} - obtctl clractivebgto ${w[4]} - obtctl clrnormalbg ${w[0]} - obtctl clrnormalbgto "$(pastel darken 0.1 "${w[0]}"|pastel format hex)" + case "$wall2themes_ob" in + dark) obtheme light;; + light) obtheme dark;; + *) : ;; + esac # PYRADIO THEME case "$wall2themes_pyradio" in dark) pyradio_theme light;; diff --git a/share/mabox-colorizer/help/en.html b/share/mabox-colorizer/help/en.html index c3526a2..4517cf7 100644 --- a/share/mabox-colorizer/help/en.html +++ b/share/mabox-colorizer/help/en.html @@ -409,7 +409,7 @@ You can add your own commands to each Conky, which will be show -
+


Window decorations

@@ -457,10 +457,35 @@ You can add your own commands to each Conky, which will be show
+ +
+
+

+

When playing with Colorizer for a long time, music can be a good companion

+

You can turn on PyRadio super+r and listen to nice music.
Chillout?

+
+ +
+
+


PyRadio

+ + + +
+
+
+

Automatic generation of themes after changing wallpaper

(Experimental)

-

You can set the theme to auto-generate when you change wallpaper.
Use  Colorizer -> Settings or  edit configuration file to configure this feature.

+

You can set the theme to auto-generate when you change wallpaper.
Use  Colorizer -> Settings or  edit configuration file to configure this feature.



diff --git a/share/mabox-colorizer/help/pl.html b/share/mabox-colorizer/help/pl.html index 7654068..367a9b6 100644 --- a/share/mabox-colorizer/help/pl.html +++ b/share/mabox-colorizer/help/pl.html @@ -136,7 +136,7 @@ kbd {
-

Colorizer generuje paletę kolorów na bazie aktualnie ustawionej tapety.

+

Colorizer generuje paletę kolorów na bazie aktualnie ustawionej tapety

Na bazie takiej palety kolorów możliwe jest zastosowanie dwóch wersji motywów (ciemny i jasny) dla:

  • dekoracji okien OpenBox
  • @@ -160,7 +160,7 @@ kbd {
-
+


Dekoracje okien

@@ -208,6 +208,30 @@ kbd {
+ +
+
+

+

Podczas dłuższej zabawy Colorizerem, dobrym kompanem może być muzyka

+

Możesz włączyć PyRadio super+r i posłuchać przyjemnej muzyki
Polecam Chillout ;)

+
+ +
+
+


PyRadio

+
+ Ciemne + Jasne +
+ + +
+
+

Automatyczne generowanie motywów po zmianie tapety

(Eksperymentalne)