big update

master 0.6.0
Daniel Napora 2022-08-20 20:51:56 +02:00
parent ef7c0ec0f2
commit 587d170ccd
12 changed files with 384 additions and 116 deletions

View File

@ -6,4 +6,4 @@
- autogenerated colorschemes from wallpaper colors (light and dark) for menus and conkies
- scripts to handle tint2 panel
- colorize "folder" icons
- GTK theme (if possible)

View File

@ -33,6 +33,12 @@ source "$CNF_FILE"
case "$LANG" in
pl*)
REGENERATE="Regeneruj..."
REGENERATEALL="Regeneruj wszystko"
ASCONFIGURED="wg konfiguracji"
REVERSE="odwrotnie"
CURRENTCONF="Obecna konfiguracja"
MODULES="Moduły"
OBTHEME="Motyw Openbox"
MENUPANELS="Menu i Panele"
TERMINALTHEME="Motyw terminala"
@ -47,6 +53,9 @@ case "$LANG" in
SETTINGS="Ustawienia"
COLORIZER_SETTINGS="Ustawienia Colorizera"
AUTOGEN_THEMES="Autogenerowanie motywów?"
GENMENU="Pokolorować menu i panele?"
GENCONKY="Pokolorować Conky?"
GENPYRADIO="Pokolorować PyRadio?"
EDITCONF="Edytuj plik konfiguracyjny"
RESET="Resetuj ustawienia Colorizera"
YES="Tak"
@ -77,6 +86,12 @@ case "$LANG" in
HELP="Pomoc"
;;
*)
REGENERATE="Regenerate..."
REGENERATEALL="Regenerate all"
ASCONFIGURED="as configured"
REVERSE="reverse"
CURRENTCONF="Current configuration"
MODULES="Modules"
OBTHEME="Openbox Theme"
MENUPANELS="Menus/Panels"
TERMINALTHEME="Terminal color scheme"
@ -91,6 +106,9 @@ case "$LANG" in
SETTINGS="Settings"
COLORIZER_SETTINGS="Colorizer Settings"
AUTOGEN_THEMES="Autogenerate themes?"
GENMENU="Colorize Menus and Panels?"
GENCONKY="Colorize Conky?"
GENPYRADIO="Colorize PyRadio?"
EDITCONF="Edit config file"
RESET="Reset to defaults"
YES="Yes"
@ -153,6 +171,16 @@ mint+=("#6cabcd" "#5b73c4" "#aa876a" "#9d9d9d" "#db9d61" "#c76199" "#8c6ec9" "#c
out+=("^sep(Mabox Colorizer)")
out+=("$REGENERATE,^checkout(regen)")
out2+=("^tag(regen)")
out2+=("^sep($REGENERATEALL)")
out2+=(" $ASCONFIGURED,w2theme colorize;colorizer -s")
out2+=(" $REVERSE,w2theme reverse;colorizer -s")
out2+=("^sep($CURRENTCONF)")
out2+=("$MENUPANELS [ <b>${wall2themes_menu}</b> ],^checkout(mp)")
out2+=("Conky [ <b>${wall2themes_conky}</b> ],^checkout(conky)")
out2+=("PyRadio [ <b>${wall2themes_pyradio}</b> ],^checkout(pyradio)")
out+=("^sep($MODULES)")
out+=("$OBTHEME,^pipe(colorizer-ob)")
out+=("$MENUPANELS,^pipe(colorizer-menus)")
#out+=("TINT2,^pipe(colorizer-tint2)")
@ -178,7 +206,7 @@ out2+=("^sep(Plasma)")
for i in ${plasma[@]};do out2+=("<tt><small>$i</small> <span bgcolor='$i'> </span></tt>,w2theme accent '${i}';colorizer -s");done
out+=("^sep()")
out+=("$EDIT_PALETTE,geany $WALLPALDIR/$WALLPAPER.clr")
out+=("$EDIT_PALETTE,xdg-open $WALLPALDIR/$WALLPAPER.clr")
if [[ "$wall2themes" == "yes" ]];then
out+=("^sep($RANDWALL)")
@ -222,7 +250,7 @@ out3+=("$NO,mb-setvar wall2themes=no $CNF_FILE;colorizer -s")
out2+=("^sep()")
out2+=("$MENUPANELS [ <b>${wall2themes_menu}</b> ],^checkout(mp)")
out3+=("^tag(mp)")
out3+=("^sep(Generate menu/panels theme?)")
out3+=("^sep($GENMENU)")
out3+=("$NO,mb-setvar wall2themes_menu=none $CNF_FILE;colorizer -s")
out3+=("^sep()")
out3+=("$LIGHTBG,mb-setvar wall2themes_menu=light $CNF_FILE;colorizer -s")
@ -230,7 +258,7 @@ out3+=("$DARKBG,mb-setvar wall2themes_menu=dark $CNF_FILE;colorizer -s")
out2+=("Conky [ <b>${wall2themes_conky}</b> ],^checkout(conky)")
out3+=("^tag(conky)")
out3+=("^sep(Generate Conky theme?)")
out3+=("^sep($GENCONKY)")
out3+=("$NO,mb-setvar wall2themes_conky=none $CNF_FILE;colorizer -s")
out3+=("^sep()")
out3+=("$LIGHTBG,mb-setvar wall2themes_conky=light $CNF_FILE;colorizer -s")
@ -238,7 +266,7 @@ out3+=("$DARKBG,mb-setvar wall2themes_conky=dark $CNF_FILE;colorizer -s")
out2+=("PyRadio [ <b>${wall2themes_pyradio}</b> ],^checkout(pyradio)")
out3+=("^tag(pyradio)")
out3+=("^sep(Generate PyRadio theme?)")
out3+=("^sep($GENPYRADIO)")
out3+=("$NO,mb-setvar wall2themes_pyradio=none $CNF_FILE;colorizer -s")
out3+=("^sep()")
out3+=("$LIGHTBG,mb-setvar wall2themes_pyradio=light $CNF_FILE;colorizer -s")
@ -313,10 +341,6 @@ if [[ "$1" == "-s" ]]; then
JGWIDTH=$((jgtools_padding + 278 + jgtools_padding))
MENU_PADDING_TOP=$((jgtools_padding + 158))
#TEMP POSITION:
#MENU_VALIGN="top"
#MENU_MARGIN_Y="60"
THUMBDIR="$HOME/.config/mabox/wallthumbs"
mkdir -p ${THUMBDIR}
THUMB="${THUMBDIR}/${WALLPAPER}.png"

View File

@ -22,14 +22,60 @@ fi
case "$LANG" in
pl*)
COLORIZECONKY="Pokoloruj Conky"
GENERATEFROMWP="Generuj z kolorów tapety"
LIGHTBG="Jasne tło"
DARKBG="Ciemne tło"
GLOBALSETTINGS="Ustawienia globalne (zmień dla wszystkich)"
DEFCOLOR="Domyślny kolor"
COLOR="Kolor"
BACKGROUND="Kolor tła"
TRANSPARENT="Przezroczyste?"
YES="Tak"
NO="Nie"
FONTS="Czcionka"
SELECTFONT="Wybierz czcionkę..."
INCREASE="Powiększ"
DECREASE="Pomniejsz"
OLINE="Obrys"
SHADOW="Cień"
DRAW="Rysuj"
BORDERS="Obramowanie"
INDSETTINGS="Ustawiania indywidualne"
MORECONKIES="Więcej Conky..."
CLICKTOSTART="Kliknij aby uruchomić"
STARTALL="Uruchom wszystkie"
RESET="Resetuj"
RESETALL="Resetuj wszystkie"
AREYOUSURE="Czy aby napewno?"
;;
*)
COLORIZECONKY="Colorize Conky"
GENERATEFROMWP="Generate from wallpaper colors"
LIGHTBG="Light Background"
DARKBG="Dark Background"
GLOBALSETTINGS="Global settings (apply to all)"
DEFCOLOR="Default color"
COLOR="Color"
BACKGROUND="Background color"
TRANSPARENT="Transparent?"
YES="Yes"
NO="No"
FONTS="Font"
SELECTFONT="Select Font..."
INCREASE="Increase"
DECREASE="Decrease"
OLINE="Outline"
SHADOW="Shadow"
DRAW="Rysuj"
BORDERS="Borders"
INDSETTINGS="Individual settings"
MORECONKIES="More Conkies Available"
CLICKTOSTART="click to start"
STARTALL="Start all"
RESET="Reset"
RESETALL="Reset all to defaults"
AREYOUSURE="Are you sure?"
;;
esac
@ -64,50 +110,50 @@ if pgrep -af "conky.*mbcolor" >/dev/null; then
getvalues
[[ "$WINTRANS" == false ]] && BG="bgcolor='$WINCLR'" || BG=""
out+=("^sep(Colorize Conky)")
out+=("^sep($COLORIZECONKY)")
out+=("^sep($GENERATEFROMWP)")
out+=("$LIGHTBG,w2theme conky light;$me")
out+=("$DARKBG,w2theme conky dark;$me")
out+=("^sep(<small><i>Global settings (apply to all)</i></small>)")
out+=("<small><span bgcolor='$CLR'> </span><span weight='bold' ${BG} fgcolor='$CLR'> AbCd </span></small> Default color <small>(normal text and border)</small>,^pipe(mbclr '$CLR' conkyctl default_color_all DEFAULT_COLOR '$me')")
out+=("<small><span bgcolor='$CLR0'> </span><span weight='bold' ${BG} fgcolor='$CLR0'> AbCd </span></small> Color 0 <small>(normal text2)</small>,^pipe(mbclr '$CLR0' conkyctl color0_all COLOR_0 '$me')")
out+=("<small><span bgcolor='$CLR1'> </span><span weight='bold' ${BG} fgcolor='$CLR1'> AbCd </span></small> Color 1 <small>(bigger text)</small>,^pipe(mbclr '$CLR1' conkyctl color1_all COLOR_1 '$me')")
out+=("<small><span bgcolor='$CLR2'> </span><span weight='bold' ${BG} fgcolor='$CLR2'> AbCd </span></small> Color 2 <small>(bars/graphs)</small>,^pipe(mbclr '$CLR2' conkyctl color2_all COLOR_2 '$me')")
out+=("^sep(<small><i>$GLOBALSETTINGS</i></small>)")
out+=("<small><span bgcolor='$CLR'> </span><span weight='bold' ${BG} fgcolor='$CLR'> AbCd </span></small> $DEFCOLOR <small>(text and border)</small>,^pipe(mbclr '$CLR' conkyctl default_color_all DEFAULT_COLOR '$me')")
out+=("<small><span bgcolor='$CLR0'> </span><span weight='bold' ${BG} fgcolor='$CLR0'> AbCd </span></small> $COLOR 0 <small>(text2)</small>,^pipe(mbclr '$CLR0' conkyctl color0_all COLOR_0 '$me')")
out+=("<small><span bgcolor='$CLR1'> </span><span weight='bold' ${BG} fgcolor='$CLR1'> AbCd </span></small> $COLOR 1 <small>(bigger text)</small>,^pipe(mbclr '$CLR1' conkyctl color1_all COLOR_1 '$me')")
out+=("<small><span bgcolor='$CLR2'> </span><span weight='bold' ${BG} fgcolor='$CLR2'> AbCd </span></small> $COLOR 2 <small>(bars/graphs)</small>,^pipe(mbclr '$CLR2' conkyctl color2_all COLOR_2 '$me')")
out+=("^sep()")
if [ "$WINTRANS" == false ];then
out+=("<small><span bgcolor='$WINCLR'> </span><span ${BG} fgcolor='$WINCLR'> AbCd </span></small> Background,^checkout(trans)")
out+=("<small><span bgcolor='$WINCLR'> </span><span ${BG} fgcolor='$WINCLR'> AbCd </span></small> $BACKGROUND,^checkout(trans)")
else
out+=("<small><span>transparent </span></small> Background,^checkout(trans)")
out+=("<small><span>transparent </span></small> $BACKGROUND,^checkout(trans)")
fi
out2+=("^tag(trans)")
out2+=("^sep(TRANSPARENT?)")
out2+=("Yes,conkyctl transparent_all true;$me")
out2+=("No,conkyctl transparent_all false;$me")
out2+=("^sep($TRANSPARENT)")
out2+=("$YES,conkyctl transparent_all true;$me")
out2+=("$NO,conkyctl transparent_all false;$me")
out2+=("^sep()")
out2+=("<small><span bgcolor='$WINCLR'> </span></small> Background color,^pipe(mbclr '$WINCLR' conkyctl win_bgcolor_all WIN_BGCOLOR '$me')")
out2+=("<small><span bgcolor='$WINCLR'> </span></small> $BACKGROUND,^pipe(mbclr '$WINCLR' conkyctl win_bgcolor_all WIN_BGCOLOR '$me')")
out+=("^sep()")
out+=("FONTS [ <b>$FONT $FONTSIZE</b> ],^checkout(font)")
out+=("$FONTS [ <b>$FONT $FONTSIZE</b> ],^checkout(font)")
out2+=("^tag(font)")
out2+=("^sep(BASE_FONT)")
out2+=("Set custom basefont...,mb-setfont conky_all;$me")
out2+=("^sep($FONTS)")
out2+=("$SELECTFONT,mb-setfont conky_all;$me")
out2+=("^sep()")
out2+=("<tt>++</tt> Increase,conkyctl basefont_inc_all;$me")
out2+=("<tt>--</tt> Decrease,conkyctl basefont_dec_all;$me")
out+=("Outline/Shadow [ <b>$SHADOWS</b> ],^checkout(outline)")
out2+=("<tt>++</tt> $INCREASE,conkyctl basefont_inc_all;$me")
out2+=("<tt>--</tt> $DECREASE,conkyctl basefont_dec_all;$me")
out+=("$OLINE/$SHADOW [ <b>$SHADOWS</b> ],^checkout(outline)")
out2+=("^tag(outline)")
out2+=("^sep(Outline/Shadow)")
out2+=("No,conkyctl shades_all no;$me")
out2+=("^sep($DRAW $OLINE/$SHADOW?)")
out2+=("$NO,conkyctl shades_all no;$me")
out2+=("^sep()")
out2+=("Draw shades,conkyctl shades_all shadow;$me")
out2+=("Draw outline,conkyctl shades_all outline;$me")
out2+=("$DRAW $SHADOW,conkyctl shades_all shadow;$me")
out2+=("$DRAW $OLINE,conkyctl shades_all outline;$me")
out+=("^sep()")
out+=("BORDERS [ <b>$BORD $STIP</b> ],^checkout(border)")
out+=("$BORDERS [ <b>$BORD $STIP</b> ],^checkout(border)")
out2+=("^tag(border)")
out2+=("^sep(DRAW BORDERS?)")
out2+=("Yes,conkyctl draw_borders_all true;$me")
out2+=("No,conkyctl draw_borders_all false;$me")
out2+=("^sep($DRAW $BORDERS?)")
out2+=("$YES,conkyctl draw_borders_all true;$me")
out2+=("$NO,conkyctl draw_borders_all false;$me")
out2+=("^sep(STIPPLED BORDERS?)")
out2+=("0,conkyctl stippled_borders_all 0;$me")
out2+=("1,conkyctl stippled_borders_all 1;$me")
@ -134,7 +180,7 @@ if pgrep -af "conky.*mbcolor" >/dev/null; then
notstarted=($(echo ${running[@]} ${supported[@]} | tr ' ' '\n' | sort | uniq -u))
if [[ ${#running[@]} > 0 ]];then
out+=("^sep(<small><i>Individual settings</i></small>)")
out+=("^sep($INDSETTINGS)")
for c in ${running[@]};do
filename=${c##*/}
name=${filename%%_mb*}
@ -142,8 +188,8 @@ if pgrep -af "conky.*mbcolor" >/dev/null; then
out+=("${title^},^pipe(conkyctl single ${c})")
done
if [[ ${#notstarted[@]} > 0 ]];then
out+=("^sep(More Conkies Available)")
out+=("^sep(<small><i>click to start</i></small>)")
out+=("^sep($MORECONKIES)")
out+=("^sep(<small><i>$CLICKTOSTART</i></small>)")
for c in ${notstarted[@]};do
filename=${c##*/}
name=${filename%%_mb*}
@ -152,19 +198,19 @@ if pgrep -af "conky.*mbcolor" >/dev/null; then
done
if [[ ${#notstarted[@]} > 1 ]];then
out+=("^sep()")
out+=("Start all (${#notstarted[@]}),conkyctl startall;$me")
out+=("$STARTALL (${#notstarted[@]}),conkyctl startall;$me")
fi
fi
fi
out+=("^sep(RESET)")
out+=("Reset all to defaults,^checkout(resetall)")
out+=("^sep($RESET)")
out+=("$RESETALL,^checkout(resetall)")
out2+=("^tag(resetall)")
out2+=("^sep(Are you sure?)")
out2+=("Yes,rm $BASECONKY;$me")
out2+=("^sep($AREYOUSURE)")
out2+=("$YES,rm $BASECONKY;$me")
else
out+=("^sep(No supported Conky running)")
out+=("^sep(<small><i>click to start some</i></small>)")
out+=("^sep(<small><i>$CLICKTOSTART</i></small>)")
for confpath in "$CONKYDIR"/*_mb*;
do
filename=${confpath##*/}
@ -173,7 +219,7 @@ else
out+=("${title^},conkyctl startone ${confpath};$me")
done
out+=("^sep()")
out+=("Start all,conkyctl startall;$me")
out+=("$STARTALL,conkyctl startall;$me")
fi
### RUN
@ -184,7 +230,7 @@ if [[ "$1" == "-s" ]]; then
source $HOME/.config/colorizer/colorizer.conf
out+=("^sep()")
out+=(" ⮜ Back to Colorizer,colorizer -s")
out+=(" ⮜⮜⮜ Colorizer,colorizer -s")
if [[ "$colorizer_size" == "full" ]];then
eval $(xdotool getdisplaygeometry --shell)

View File

@ -123,6 +123,7 @@ out2+=("6,jgctl item_radius 6;$me")
out+=("^sep(MORE MENU SETTINGS)")
out+=("Global Menu Settings,jgmenusettings-pipe -c")
out+=("Global Menu Settings,^pipe(jgmenusettings-pipe -r)")
### COPIED FROM jgmenusettings-pipe for now
#out+=("FONT_ITEM [ <b>${menu_font_family:-0} ${menu_font_size:-0}</b> ],mb-setfont menu_item;$me")
#out+=("FONT_TITLE [ <b>${menu_sep_font_family:-0} ${menu_sep_font_size:-0}</b> ],mb-setfont menu_sep;$me")
@ -130,14 +131,14 @@ out+=("Global Menu Settings,jgmenusettings-pipe -c")
#out+=("PADDING [ <b>${jgtools_padding:-0}</b> ],^checkout(mpadding)")
#out+=("RADIUS [ <b>${jgtools_radius:-0}</b> ],^checkout(mradius)")
#out+=("SUBSPACING [ <b>${submenu_spacing:-0}</b> ],^checkout(subspacing)")
out2+=("^tag(mborder)")
for i in 0 1 2 3 4 5 6 8 10 12; do out2+=("$(printf "<tt>%3s</tt>,%s" "$i" "mb-setvar jgtools_border=${i};$me")");done
out2+=("^tag(mpadding)")
for i in 0 2 4 6 8 10 12 14 16 18 20 22 24 28 32 40; do out2+=("$(printf "<tt>%3s</tt>,%s" "$i" "mb-setvar jgtools_padding=${i};$me")");done
out2+=("^tag(mradius)")
for i in 0 1 2 3 4 6 8 12 14 16 18 20 40; do out2+=("$(printf "<tt>%3s</tt>,%s" "$i" "mb-setvar jgtools_radius=${i};$me")");done
out2+=("^tag(subspacing)")
for i in -20 -8 -6 -4 -2 0 1 2 4 6 8 10 12 14 16 18 20; do out2+=("$(printf "<tt>%4s</tt>,%s" "$i" "mb-setvar submenu_spacing=${i};$me")");done
#out2+=("^tag(mborder)")
#for i in 0 1 2 3 4 5 6 8 10 12; do out2+=("$(printf "<tt>%3s</tt>,%s" "$i" "mb-setvar jgtools_border=${i};$me")");done
#out2+=("^tag(mpadding)")
#for i in 0 2 4 6 8 10 12 14 16 18 20 22 24 28 32 40; do out2+=("$(printf "<tt>%3s</tt>,%s" "$i" "mb-setvar jgtools_padding=${i};$me")");done
#out2+=("^tag(mradius)")
#for i in 0 1 2 3 4 6 8 12 14 16 18 20 40; do out2+=("$(printf "<tt>%3s</tt>,%s" "$i" "mb-setvar jgtools_radius=${i};$me")");done
#out2+=("^tag(subspacing)")
#for i in -20 -8 -6 -4 -2 0 1 2 4 6 8 10 12 14 16 18 20; do out2+=("$(printf "<tt>%4s</tt>,%s" "$i" "mb-setvar submenu_spacing=${i};$me")");done
out+=("^sep()")
if [ -f "${THEMERC}.bak" ]; then
@ -156,7 +157,7 @@ if [[ "$1" == "-s" ]]; then
source "$CNF_FILE"
out+=("^sep()")
out+=(" ⮜ Back to Colorizer,colorizer -s")
out+=(" ⮜⮜⮜ Colorizer,colorizer -s")
if [[ "$colorizer_size" == "full" ]];then
eval $(xdotool getdisplaygeometry --shell)

View File

@ -213,7 +213,7 @@ if [[ "$1" == "-s" ]]; then
source $HOME/.config/colorizer/colorizer.conf
out+=("^sep()")
out+=(" ⮜ Back to Colorizer,colorizer -s")
out+=(" ⮜⮜⮜ Colorizer,colorizer -s")
if [[ "$colorizer_size" == "full" ]];then

View File

@ -11,26 +11,42 @@ THEMERC=~/.config/pyradio/themes/mbcolors.pyradio-theme
case "$LANG" in
pl*)
COLORIZE_PYRADIO="Pokoloruj PyRadio"
START_PYRADIO="Uruchom PyRadio"
INFO="Info"
INFO_HEAD="Jak działa automatyczna zmiana kolorów?"
INFO_TXT="Automatyczna zmiana kolorów działa z motywem <b>mbcolors</b> (User theme).\nAby go ustawić:\n- użyj klawisza <b>t</b> - wybór motywów\n- zaznacz motyw <i>mbcolors</i> i naciśnij <b>spację</b> - (ustawia jako domyślny)\n- wciśnij <b>c</b> - aby włączyć śledzenie zmian w pliku motywu.\n\n"
RESETTHEME="Resetuj motyw"
GENERATEFROMWP="Generuj z kolorów tapety..."
LIGHTBG="Jasne tło"
DARKBG="Ciemne tło"
SETCOLORS="Ustaw kolory..."
RESETTHEME="Resetuj motyw"
EXPORTTHEME="Eksportuj obecne kolory jako nowy motyw"
CONFIG_AND_DOCS="Konfiguracja i Dokumentacja"
README="PyRadio CZYTAJTO"
MANUAL="Manual PyRadio"
EDITCONF="Edytuj plik konfiguracyjny"
EDITSTATIONS="Edytuj listę stacji"
CONFIGDIR="Katalog z konfiguracją"
;;
*)
COLORIZE_PYRADIO="Colorize PyRadio"
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"
RESETTHEME="Reset theme"
GENERATEFROMWP="Generate from wallpaper colors..."
LIGHTBG="Light Background"
DARKBG="Dark Background"
SETCOLORS="Set colors individually..."
RESETTHEME="Reset theme"
EXPORTTHEME="Export current colors as new theme"
CONFIG_AND_DOCS="Config and Docs"
README="PyRadi README"
MANUAL="PyRadio Manual"
EDITCONF="Edit config file"
EDITSTATIONS="Edit stations list"
CONFIGDIR="Config Dir"
;;
esac
@ -48,10 +64,9 @@ read MB1 MB2 MBFG<<< "$(grep '^Messages Border ' ${THEMERC})"
}
getvalues
out+=("^sep(Colorize PyRadio)")
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+=("$RESETTHEME,prtctl resettheme;$me")
out+=("^sep($GENERATEFROMWP)")
out+=("$LIGHTBG,w2theme pyradio light;$me")
out+=("$DARKBG,w2theme pyradio dark;$me")
@ -91,6 +106,20 @@ read MB1 MB2 MBFG<<< "$(grep '^Messages Border ' ${THEMERC})"
out+=("<tt><span weight='bold' bgcolor='$SBG' fgcolor='$EFFG'> AbCd </span></tt> Extra Func,^pipe(mbclr '$EFFG' prtctl extra_func EXTRA_FUNC '$me')")
out+=("<tt><span weight='bold' bgcolor='$SBG' fgcolor='$PURLFG'> AbCd </span></tt> PyRadio URL,^pipe(mbclr '$PURLFG' prtctl pyradio_url 'PyRadio URL' '$me')")
out+=("<tt><span weight='bold' bgcolor='$SBG' fgcolor='$MBFG'> AbCd </span></tt> Messages Border,^pipe(mbclr '$MBFG' prtctl messages_border 'Messages Border' '$me')")
out+=("^sep()")
out+=("$RESETTHEME,prtctl resettheme;$me")
out+=("^sep()")
out+=("$EXPORTTHEME,prtctl exp;$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")
out+=(" $MANUAL,^term(man pyradio)")
out+=("^sep()")
out+=(" $EDITCONF,xdg-open ~/.config/pyradio/config")
out+=(" $EDITSTATIONS,xdg-open ~/.config/pyradio/stations.csv")
out+=("^sep()")
out+=(" $CONFIGDIR,^pipe(jgbrowser ~/.config/pyradio)")
### RUN
@ -103,7 +132,7 @@ if [[ "$1" == "-s" ]]; then
source "$CNF_FILE"
out+=("^sep()")
out+=(" ⮜ Back to Colorizer,colorizer -s")
out+=(" ⮜⮜⮜ Colorizer,colorizer -s")
if [[ "$colorizer_size" == "full" ]];then
eval $(xdotool getdisplaygeometry --shell)

View File

@ -163,6 +163,46 @@ gap_x () {
gap_y () {
sd "gap_y .*=.*,$" "gap_y = ${1}," ${2}
}
setpos () {
filename=${1##*/}
name=${filename%%_mb*}
title=${name//_/ }
case "$LANG" in
pl*)
SUMM="Mark new position for ${title^} Conky"
BODY=""
ABORTED_SUMM=""
ABORTED_BODY=""
THNX_SUMM=""
THNX_BODY=""
;;
*)
SUMM="Mark new position for ${title^} Conky"
BODY=""
ABORTED_SUMM=""
ABORTED_BODY=""
THNX_SUMM=""
THNX_BODY=""
;;
esac
wmctrl -k on
notify-send.sh -i mbcc --replace-file=/tmp/conkyctlfile "${SUMM}" "\nDraw small rectangle to mark new position...\n <i>(ESC or right click to abort)</i>"
read -r X Y < <(slop -t 0 -l -b 3 --color=0.3,0.4,0.6,0.4 -f "%x %y")
if [ -z "$X" ]
then
notify-send.sh -i mbcc --replace-file=/tmp/conkyctlfile "Mark new position for ${title^} Conky" "\n....anulowano"
else
pos top_left ${1}
((X=X+16))
((Y=Y+16))
gap_x ${X} ${1}
gap_y ${Y} ${1}
notify-send.sh -i mbcc --replace-file=/tmp/conkyctlfile "Dziękuję!" "Zmieniono pozycję ${title^} \nX: $X\nY: $Y"
#wmctrl -k off
fi
}
startone () {
conky -c "${1}"
update_session
@ -183,6 +223,64 @@ kill () {
}
single () {
case "$LANG" in
pl*)
POSITION="Pozycja"
MARKNEWPOS="Nowa pozycja (<i>zaznacz na ekranie</i>)..."
ALIGNMENT="Wyrównanie"
HORIZONTAL_GAP="Odstęp poziomy"
VERTICAL_GAP="Odstęp pionowy"
COLORS="Kolory"
DEFCOLOR="Domyślny kolor"
COLOR="Kolor"
BACKGROUND="Kolor tła"
TRANSPARENT="Przezroczyste?"
YES="Tak"
NO="Nie"
FONTS="Czcionka"
SELECTFONT="Wybierz czcionkę..."
INCREASE="Powiększ"
DECREASE="Pomniejsz"
OLINE="Obrys"
SHADOW="Cień"
DRAW="Rysuj"
BORDERS="Obramowanie"
EDIT="Edytuj plik"
KILL="Zabij"
LOGOSIZE="Rozmiar logo"
SMALL="Małe"
NORMAL="Normalne"
BIG="Duże"
;;
*)
POSITION="Position"
MARKNEWPOS="New position (<i>mark on the screen</i>)..."
ALIGNMENT="Alignment"
HORIZONTAL_GAP="Horizontal Gap"
VERTICAL_GAP="Vertical Gap"
COLORS="Colors"
DEFCOLOR="Default color"
COLOR="Color"
BACKGROUND="Background color"
TRANSPARENT="Transparent?"
YES="Yes"
NO="No"
FONTS="Font"
SELECTFONT="Select Font..."
INCREASE="Increase"
DECREASE="Decrease"
OLINE="Outline"
SHADOW="Shadow"
DRAW="DRAW"
BORDERS="Borders"
EDIT="Edit file"
KILL="Kill"
LOGOSIZE="Logo size"
SMALL="Small"
NORMAL="Normal"
BIG="Big"
;;
esac
filename=${1##*/}
name=${filename%%_mb*}
title=${name//_/ }
@ -218,10 +316,12 @@ single () {
[[ "$WINTRANS" == false ]] && BG="bgcolor='$WINCLR'" || BG=""
out+=("^sep(POSITION)")
out+=("Alignment [ <b>$POS</b> ],^checkout(pos)")
out+=("^sep($POSITION)")
out+=("$MARKNEWPOS,conkyctl setpos ${1};$me")
out+=("^sep()")
out+=("$ALIGNMENT [ <b>$POS</b> ],^checkout(pos)")
out2+=("^tag(pos)")
out2+=("^sep(POSITION)")
out2+=("^sep($POSITION)")
out2+=("TopLeft,conkyctl pos top_left ${1};$me")
out2+=("Top,conkyctl pos top_middle ${1};$me")
out2+=("TopRight,conkyctl pos top_right ${1};$me")
@ -231,75 +331,76 @@ single () {
out2+=("BottomLeft,conkyctl pos bottom_left ${1};$me")
out2+=("Bottom,conkyctl pos bottom_middle ${1};$me")
out2+=("BottomRight,conkyctl pos bottom_right ${1};$me")
out+=("HORIZONTAL GAP [ <b>$GAPX</b> ],^checkout(gapx)")
out+=("$HORIZONTAL_GAP [ <b>$GAPX</b> ],^checkout(gapx)")
out2+=("^tag(gapx)")
out2+=("^sep(HORIZONTAL_GAP)")
out2+=("^sep($HORIZONTAL_GAP)")
for i in 0 10 20 30 40 60 80 100 120 140 160 180 200 220 240 260 280 300 320 340 360; do
out2+=("${i},conkyctl gap_x ${i} ${1};$me")
done
out+=("VERTICAL GAP [ <b>$GAPY</b> ],^checkout(gapy)")
out+=("$VERTICAL_GAP [ <b>$GAPY</b> ],^checkout(gapy)")
out2+=("^tag(gapy)")
out2+=("^sep(VERTICAL_GAP)")
out2+=("^sep($VERTICAL_GAP)")
for i in 0 10 20 30 40 60 80 100 120 140 160 180 200 220 240 260 280 300 320 340 360; do
out2+=("${i},conkyctl gap_y ${i} ${1};$me")
done
if [[ "$1" =~ "logo_mbcolor" ]]; then
read LSIZE <<< "$(grep minimum_height ${1} | cut -d'=' -f2 | cut -d"," -f1)"
out+=("^sep(Size)")
out+=("Logo size [ <b>$LSIZE</b> ],^checkout(logosize)")
out+=("^sep($LOGOSIZE)")
out+=("$LOGOSIZE [ <b>$LSIZE</b> ],^checkout(logosize)")
out2+=("^tag(logosize)")
out2+=("^sep(Logo size)")
out2+=("Small 64px,conkyctl logosize 64;$me")
out2+=("Normal 128px,conkyctl logosize 128;$me")
out2+=("Big 256px,conkyctl logosize 256;$me")
out2+=("^sep($LOGOSIZE)")
out2+=("$SMALL 64px,conkyctl logosize 64;$me")
out2+=("$NORMAL 128px,conkyctl logosize 128;$me")
out2+=("$BIG 256px,conkyctl logosize 256;$me")
fi
out+=("^sep(COLORS)")
out+=("^sep($COLORS)")
if [[ "$1" != *"logo_mbcolor"* ]]; then
[[ "$CLR" != "#" ]] && out+=("<small><span bgcolor='$CLR'> </span><span ${BG} fgcolor='$CLR'> AbCd </span></small> Default color,^pipe(mbclr '$CLR' conkyctl default_color DEFAULT_COLOR '$me' ${1})")
[[ "$CLR0" != "#" ]] && out+=("<small><span bgcolor='$CLR0'> </span><span ${BG} fgcolor='$CLR0'> AbCd </span></small> Color 0,^pipe(mbclr '$CLR0' conkyctl color0 COLOR_0 '$me' ${1})")
[[ "$CLR1" != "#" ]] && out+=("<small><span bgcolor='$CLR1'> </span><span ${BG} fgcolor='$CLR1'> AbCd </span></small> Color 1,^pipe(mbclr '$CLR1' conkyctl color1 COLOR_1 '$me' ${1})")
[[ "$CLR2" != "#" ]] && out+=("<small><span bgcolor='$CLR2'> </span><span ${BG} fgcolor='$CLR2'> AbCd </span></small> Color 2,^pipe(mbclr '$CLR2' conkyctl color2 COLOR_2 '$me' ${1})")
[[ "$CLR" != "#" ]] && out+=("<small><span bgcolor='$CLR'> </span><span ${BG} fgcolor='$CLR'> AbCd </span></small> $DEFCOLOR,^pipe(mbclr '$CLR' conkyctl default_color DEFAULT_COLOR '$me' ${1})")
[[ "$CLR0" != "#" ]] && out+=("<small><span bgcolor='$CLR0'> </span><span ${BG} fgcolor='$CLR0'> AbCd </span></small> $COLOR 0,^pipe(mbclr '$CLR0' conkyctl color0 COLOR_0 '$me' ${1})")
[[ "$CLR1" != "#" ]] && out+=("<small><span bgcolor='$CLR1'> </span><span ${BG} fgcolor='$CLR1'> AbCd </span></small> $COLOR 1,^pipe(mbclr '$CLR1' conkyctl color1 COLOR_1 '$me' ${1})")
[[ "$CLR2" != "#" ]] && out+=("<small><span bgcolor='$CLR2'> </span><span ${BG} fgcolor='$CLR2'> AbCd </span></small> $COLOR 2,^pipe(mbclr '$CLR2' conkyctl color2 COLOR_2 '$me' ${1})")
out+=("^sep()")
fi
if [ "$WINTRANS" == false ];then
out+=("<small><span bgcolor='$WINCLR'> </span><span ${BG} fgcolor='$WINCLR'> AbCd </span></small> Background,^checkout(transsingle)")
out+=("<small><span bgcolor='$WINCLR'> </span><span ${BG} fgcolor='$WINCLR'> AbCd </span></small> $BACKGROUND,^checkout(transsingle)")
else
out+=("<small><span>transparent </span></small> Background,^checkout(transsingle)")
out+=("<small><span>transparent </span></small> $BACKGROUND,^checkout(transsingle)")
fi
out+=("^sep()")
out2+=("^tag(transsingle)")
out2+=("^sep(TRANSPARENT?)")
out2+=("Yes,conkyctl transparent true ${1};$me")
out2+=("No,conkyctl transparent false ${1};$me")
out2+=("^sep($TRANSPARENT)")
out2+=("$YES,conkyctl transparent true ${1};$me")
out2+=("$NO,conkyctl transparent false ${1};$me")
out2+=("^sep()")
out2+=("<small><span bgcolor='$WINCLR'> </span></small> Background color,^pipe(mbclr '$WINCLR' conkyctl win_bgcolor WIN_BGCOLOR '$me' ${1})")
out2+=("<small><span bgcolor='$WINCLR'> </span></small> $BACKGROUND,^pipe(mbclr '$WINCLR' conkyctl win_bgcolor WIN_BGCOLOR '$me' ${1})")
if [[ "$1" != *"logo_mbcolor"* ]]; then
if [[ "$1" != *"quoter_mbcolor"* ]]; then
out+=("FONT [ <b>$FONT $FONTSIZE</b> ],^checkout(fontsingle)")
out+=("$FONTS [ <b>$FONT $FONTSIZE</b> ],^checkout(fontsingle)")
out2+=("^tag(fontsingle)")
out2+=("^sep(BASE_FONT)")
out2+=("^sep($FONTS)")
out2+=("Set custom basefont...,mb-setfont conky_single ${1};$me")
out2+=("$SELECTFONT,mb-setfont conky_single ${1};$me")
out2+=("^sep()")
out2+=("<tt>++</tt> Increase,conkyctl basefont_inc ${1};$me")
out2+=("<tt>--</tt> Decrease,conkyctl basefont_dec ${1};$me")
out2+=("<tt>++</tt> $INCREASE,conkyctl basefont_inc ${1};$me")
out2+=("<tt>--</tt> $DECREASE,conkyctl basefont_dec ${1};$me")
fi
out+=("Outline/Shadow [ <b>$SHADOWS</b> ],^checkout(outline2)")
out+=("$OLINE/$SHADOW [ <b>$SHADOWS</b> ],^checkout(outline2)")
out2+=("^tag(outline2)")
out2+=("^sep(Outline/Shadow)")
out2+=("No,conkyctl shades no ${1};$me")
out2+=("^sep($DRAW $OLINE/$SHADOW?)")
out2+=("$NO,conkyctl shades no ${1};$me")
out2+=("^sep()")
out2+=("Draw shades,conkyctl shades shadow ${1};$me")
out2+=("Draw outline,conkyctl shades outline ${1};$me")
out2+=("$DRAW $SHADOW,conkyctl shades shadow ${1};$me")
out2+=("$DRAW $OLINE,conkyctl shades outline ${1};$me")
out+=("^sep()")
fi
out+=("BORDERS [ <b>$BORD $STIP</b> ],^checkout(bordersingle)")
out+=("$BORDERS [ <b>$BORD $STIP</b> ],^checkout(bordersingle)")
out2+=("^tag(bordersingle)")
out2+=("^sep(DRAW BORDERS?)")
out2+=("Yes,conkyctl draw_borders true ${1};$me")
out2+=("No,conkyctl draw_borders false ${1};$me")
out2+=("^sep($DRAW $BORDERS?)")
out2+=("$YES,conkyctl draw_borders true ${1};$me")
out2+=("$NO,conkyctl draw_borders false ${1};$me")
out2+=("^sep(STIPPLED BORDERS?)")
out2+=("0,conkyctl stippled_borders 0 ${1};$me")
out2+=("1,conkyctl stippled_borders 1 ${1};$me")
@ -308,15 +409,16 @@ single () {
out2+=("4,conkyctl stippled_borders 4 ${1};$me")
out+=("^sep()")
out+=(" Edit ${title^},xdg-open ${1}")
out+=(" $EDIT ${title^},xdg-open ${1}")
out+=("^sep()")
out+=(" Kill ${title^},conkyctl kill ${1##*/};${me}")
out+=(" $KILL ${title^},conkyctl kill ${1##*/};${me}")
printf '%s\n' "${out[@]}"
printf '%s\n' "${out2[@]}"
exit 0
}
case "$1" in
transparent_all) transparent_all "$2";;
transparent) transparent "$2" "$3";;
@ -347,6 +449,7 @@ case "$1" in
pos) pos "$2" "$3";;
gap_x) gap_x "$2" "$3";;
gap_y) gap_y "$2" "$3";;
setpos) setpos "$2";;
startone) startone "$2";;
startall) startall;;
kill) kill "$2";;

View File

@ -73,6 +73,7 @@ color_sep_fg () {
}
color_title_bg () {
read TBG TBGA<<< "$(grep 'color_title_bg' ${THEMERC} | cut -d'=' -f2)"
#notify-send.sh "${1}" "${#1}"
case "${#1}" in
7) #color
sd "color_title_bg.*$" "color_title_bg = $1 $TBGA" ${THEMERC}

View File

@ -5,6 +5,7 @@
# TODO start pyradio if not running
THEMERC=~/.config/pyradio/themes/mbcolors.pyradio-theme
CONF_DIR="$HOME/.config/pyradio/"
stations() {
@ -116,7 +117,11 @@ PyRadio URL #d2cda1
Messages Border #d3d4bf
EOF
}
export_theme () {
DATE=$(date +'%Y%m%d-%H-%M-%S')
cp ${THEMERC} "$HOME/.config/pyradio/themes/exported_${DATE}.pyradio-theme"
notify-send.sh -i radio "PyRadio theme exported!" "\nNew PyRadio theme created as:\n<b>exported_${DATE}.pyradio-theme</b>\n" -o " Open in editor:xdg-open ${CONF_DIR}/themes/exported_${DATE}.pyradio-theme" -o " Open Themes dir:xdg-open ${CONF_DIR}/themes"
}
#run
if [ ! -f $THEMERC ]; then
resettheme
@ -143,5 +148,6 @@ case "$1" in
pyradio_url) pyradio_url "$2";;
messages_border) messages_border "$2";;
resettheme) resettheme;;
exp) export_theme;;
*);;
esac

View File

@ -91,19 +91,28 @@ pyradio_theme() {
}
accent () {
obtctl clractivebg ${1}
colorTo=$(pastel darken 0.1 "${1}"|pastel format hex)
colorTo=$(pastel darken 0.2 "${1}"|pastel format hex)
obtctl clractivebgto ${colorTo}
# JGMENU based menus, sidepanels and tools
jgctl color_title_bg ${colorTo}
jgctl color_title_bg ${1}
#TITLE_FG=$(pastel textcolor ${colorTo}|pastel format hex)
TITLE_FG=$(pastel mix -f 0.4 ${colorTo} $(pastel textcolor ${colorTo})|pastel format hex)
TITLE_FG=$(pastel textcolor ${1}|pastel format hex)
#notify-send.sh "title_fg $TITLE_FG" "${w[1]} ${w[-1]}"
if [[ "${TITLE_FG}" == *"ffffff"* ]];then
FG=${w[-2]}
BBG=${w[1]}
else
FG=${w[2]}
BBG=${w[1]}
fi
SEL_FG=$(pastel textcolor ${1}|pastel format hex)
#notify-send.sh "FG" "${TITLE_FG}"
jgctl color_title_fg ${TITLE_FG}
jgctl color_title_border ${1}
jgctl color_title_fg ${FG}
#jgctl color_title_border ${BBG}
jgctl color_sel_bg ${1}
jgctl color_sel_fg ${SEL_FG}
}
colorize () {
source ~/.config/colorizer/colorizer.conf
# CONKY
@ -112,12 +121,6 @@ colorize () {
light) conky_colors light;;
*) : ;;
esac
# MENUS
case "$wall2themes_menu" in
dark) menu_theme dark;;
light) menu_theme light;;
*) : ;;
esac
# ACCENT_COLOR
case "$wall2themes_accent" in
dark)
@ -130,6 +133,17 @@ colorize () {
;;
*) : ;;
esac
# MENUS
case "$wall2themes_menu" in
dark) menu_theme dark;;
light) menu_theme light;;
*) : ;;
esac
# Openbox
obtctl clractivebg ${w[3]}
obtctl clractivebgto ${w[4]}
obtctl clrnormalbg ${w[0]}
obtctl clrnormalbgto "$(pastel darken 0.1 "${w[0]}"|pastel format hex)"
# PYRADIO THEME
case "$wall2themes_pyradio" in
dark) pyradio_theme dark;;
@ -138,6 +152,45 @@ colorize () {
esac
}
reverse () {
source ~/.config/colorizer/colorizer.conf
# CONKY
case "$wall2themes_conky" in
dark) conky_colors light;;
light) conky_colors dark;;
*) : ;;
esac
# ACCENT_COLOR
case "$wall2themes_accent" in
dark)
obtctl theme MBcolors
accent ${w[-1]}
;;
light)
obtctl theme MBcolors
accent ${w[1]}
;;
*) : ;;
esac
# MENUS
case "$wall2themes_menu" in
dark) menu_theme light;;
light) menu_theme dark;;
*) : ;;
esac
# Openbox
obtctl clractivebg ${w[3]}
obtctl clractivebgto ${w[4]}
obtctl clrnormalbg ${w[0]}
obtctl clrnormalbgto "$(pastel darken 0.1 "${w[0]}"|pastel format hex)"
# PYRADIO THEME
case "$wall2themes_pyradio" in
dark) pyradio_theme light;;
light) pyradio_theme dark;;
*) : ;;
esac
}
pin () {
#get wallpaper path and filename without ext
@ -158,6 +211,7 @@ case "$1" in
pyradio) pyradio_theme "$2";;
accent) accent "$2";;
colorize) colorize;;
reverse) reverse;;
pin) pin;;
*) ;;
esac

View File

@ -41,14 +41,16 @@ div.fixeddown {
<div class="w3-container">
<img src="/usr/share/mabox-colorizer/img/colorizer.png" class="w3-margin"/>
<h2>Mabox Colorizer</h2>
<h2>Mabox Colorizer <span class="w3-tiny">beta</span></h2>
<p>a set of tools to easily customize your Mabox Linux Desktop</p>
<p>Easily change look and feel of:
<ul>
<li><strong>Openbox theme</strong> (windows decorations)</li>
<li><strong>Menu</strong>, <strong>Sidepanels</strong> and other <i>jgmenu-based</i> <strong>Mabox tools</strong></li>
<li><strong>Conkies</strong></li>
<li><strong>PyRadio</strong> - Internet Radio Player</li>
</ul></p>
<p>NEW!!</p><p><strong>Automatically generate themes</strong> for all above <strong>from Wallpaper colors</strong></p>
<a class="w3-button w3-round w3-small w3-lime w3-margin" href="run://colorizer -s">Launch Colorizer</a>
</div>
<div class="fixeddown">

View File

@ -41,14 +41,16 @@ div.fixeddown {
<div class="w3-container">
<img src="/usr/share/mabox-colorizer/img/colorizer.png" class="w3-margin"/>
<h2>Mabox Colorizer</h2>
<h2>Mabox Colorizer <span class="w3-tiny">beta</span></h2>
<p>a tool to easily customize your Mabox Linux Desktop</p>
<p>Easily change look and feel of:
<ul>
<li><strong>Openbox theme</strong> (windows decorations)</li>
<li><strong>Menu</strong>, <strong>Sidepanels</strong> and other <i>jgmenu-based</i> <strong>Mabox tools</strong></li>
<li><strong>Conkies</strong></li>
<li><strong>PyRadio</strong> - Internet Radio Player</li>
</ul></p>
<p>NEW!!</p><p><strong>Automatically generate themes</strong> for all above <strong>from Wallpaper colors</strong></p>
<a class="w3-button w3-round w3-small w3-lime w3-margin" href="run://colorizer -s">Launch Colorizer</a>
</div>
<div class="fixeddown">