diff --git a/TODO.md b/TODO.md index ae67109..db24e6d 100644 --- a/TODO.md +++ b/TODO.md @@ -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) + diff --git a/bin/colorizer b/bin/colorizer index 4955bb3..4f09462 100755 --- a/bin/colorizer +++ b/bin/colorizer @@ -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 [ ${wall2themes_menu} ],^checkout(mp)") + out2+=("Conky [ ${wall2themes_conky} ],^checkout(conky)") + out2+=("PyRadio [ ${wall2themes_pyradio} ],^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+=("$i ,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 [ ${wall2themes_menu} ],^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 [ ${wall2themes_conky} ],^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 [ ${wall2themes_pyradio} ],^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" diff --git a/bin/colorizer-conky b/bin/colorizer-conky index 13b65d1..51402a2 100755 --- a/bin/colorizer-conky +++ b/bin/colorizer-conky @@ -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(Global settings (apply to all))") - out+=(" AbCd Default color (normal text and border),^pipe(mbclr '$CLR' conkyctl default_color_all DEFAULT_COLOR '$me')") - out+=(" AbCd Color 0 (normal text2),^pipe(mbclr '$CLR0' conkyctl color0_all COLOR_0 '$me')") - out+=(" AbCd Color 1 (bigger text),^pipe(mbclr '$CLR1' conkyctl color1_all COLOR_1 '$me')") - out+=(" AbCd Color 2 (bars/graphs),^pipe(mbclr '$CLR2' conkyctl color2_all COLOR_2 '$me')") + out+=("^sep($GLOBALSETTINGS)") + out+=(" AbCd $DEFCOLOR (text and border),^pipe(mbclr '$CLR' conkyctl default_color_all DEFAULT_COLOR '$me')") + out+=(" AbCd $COLOR 0 (text2),^pipe(mbclr '$CLR0' conkyctl color0_all COLOR_0 '$me')") + out+=(" AbCd $COLOR 1 (bigger text),^pipe(mbclr '$CLR1' conkyctl color1_all COLOR_1 '$me')") + out+=(" AbCd $COLOR 2 (bars/graphs),^pipe(mbclr '$CLR2' conkyctl color2_all COLOR_2 '$me')") out+=("^sep()") if [ "$WINTRANS" == false ];then - out+=(" AbCd Background,^checkout(trans)") + out+=(" AbCd $BACKGROUND,^checkout(trans)") else - out+=("transparent Background,^checkout(trans)") + out+=("transparent $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+=(" Background color,^pipe(mbclr '$WINCLR' conkyctl win_bgcolor_all WIN_BGCOLOR '$me')") + out2+=(" $BACKGROUND,^pipe(mbclr '$WINCLR' conkyctl win_bgcolor_all WIN_BGCOLOR '$me')") out+=("^sep()") - out+=("FONTS [ $FONT $FONTSIZE ],^checkout(font)") + out+=("$FONTS [ $FONT $FONTSIZE ],^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+=("++ Increase,conkyctl basefont_inc_all;$me") - out2+=("-- Decrease,conkyctl basefont_dec_all;$me") - out+=("Outline/Shadow [ $SHADOWS ],^checkout(outline)") + out2+=("++ $INCREASE,conkyctl basefont_inc_all;$me") + out2+=("-- $DECREASE,conkyctl basefont_dec_all;$me") + out+=("$OLINE/$SHADOW [ $SHADOWS ],^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 [ $BORD $STIP ],^checkout(border)") + out+=("$BORDERS [ $BORD $STIP ],^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(Individual settings)") + 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(click to start)") + out+=("^sep($MORECONKIES)") + out+=("^sep($CLICKTOSTART)") 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(click to start some)") + out+=("^sep($CLICKTOSTART)") 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) diff --git a/bin/colorizer-menus b/bin/colorizer-menus index 2fddc20..8b42d82 100755 --- a/bin/colorizer-menus +++ b/bin/colorizer-menus @@ -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 [ ${menu_font_family:-0} ${menu_font_size:-0} ],mb-setfont menu_item;$me") #out+=("FONT_TITLE [ ${menu_sep_font_family:-0} ${menu_sep_font_size:-0} ],mb-setfont menu_sep;$me") @@ -130,14 +131,14 @@ out+=("Global Menu Settings,jgmenusettings-pipe -c") #out+=("PADDING [ ${jgtools_padding:-0} ],^checkout(mpadding)") #out+=("RADIUS [ ${jgtools_radius:-0} ],^checkout(mradius)") #out+=("SUBSPACING [ ${submenu_spacing:-0} ],^checkout(subspacing)") -out2+=("^tag(mborder)") -for i in 0 1 2 3 4 5 6 8 10 12; do out2+=("$(printf "%3s,%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 "%3s,%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 "%3s,%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 "%4s,%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 "%3s,%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 "%3s,%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 "%3s,%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 "%4s,%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) diff --git a/bin/colorizer-ob b/bin/colorizer-ob index 48d5d4e..74ec17c 100755 --- a/bin/colorizer-ob +++ b/bin/colorizer-ob @@ -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 diff --git a/bin/colorizer-pyradio b/bin/colorizer-pyradio index 18b763f..b4e5882 100755 --- a/bin/colorizer-pyradio +++ b/bin/colorizer-pyradio @@ -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 mbcolors (User theme).\nAby go ustawić:\n- użyj klawisza t - wybór motywów\n- zaznacz motyw mbcolors i naciśnij spację - (ustawia jako domyślny)\n- wciśnij c - 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 mbcolors user theme.\n Configuration:/n- use t key to show theme selection dialog\n- navigate to mbcolors theme and press c\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+=(" AbCd Extra Func,^pipe(mbclr '$EFFG' prtctl extra_func EXTRA_FUNC '$me')") out+=(" AbCd PyRadio URL,^pipe(mbclr '$PURLFG' prtctl pyradio_url 'PyRadio URL' '$me')") out+=(" AbCd 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) diff --git a/bin/conkyctl b/bin/conkyctl index eebdae9..bf3be1d 100755 --- a/bin/conkyctl +++ b/bin/conkyctl @@ -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 (ESC or right click to abort)" + 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 (zaznacz na ekranie)..." + 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 (mark on the screen)..." + 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 [ $POS ],^checkout(pos)") + out+=("^sep($POSITION)") + out+=("$MARKNEWPOS,conkyctl setpos ${1};$me") + out+=("^sep()") + out+=("$ALIGNMENT [ $POS ],^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 [ $GAPX ],^checkout(gapx)") + out+=("$HORIZONTAL_GAP [ $GAPX ],^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 [ $GAPY ],^checkout(gapy)") + out+=("$VERTICAL_GAP [ $GAPY ],^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 [ $LSIZE ],^checkout(logosize)") + out+=("^sep($LOGOSIZE)") + out+=("$LOGOSIZE [ $LSIZE ],^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+=(" AbCd Default color,^pipe(mbclr '$CLR' conkyctl default_color DEFAULT_COLOR '$me' ${1})") - [[ "$CLR0" != "#" ]] && out+=(" AbCd Color 0,^pipe(mbclr '$CLR0' conkyctl color0 COLOR_0 '$me' ${1})") - [[ "$CLR1" != "#" ]] && out+=(" AbCd Color 1,^pipe(mbclr '$CLR1' conkyctl color1 COLOR_1 '$me' ${1})") - [[ "$CLR2" != "#" ]] && out+=(" AbCd Color 2,^pipe(mbclr '$CLR2' conkyctl color2 COLOR_2 '$me' ${1})") + [[ "$CLR" != "#" ]] && out+=(" AbCd $DEFCOLOR,^pipe(mbclr '$CLR' conkyctl default_color DEFAULT_COLOR '$me' ${1})") + [[ "$CLR0" != "#" ]] && out+=(" AbCd $COLOR 0,^pipe(mbclr '$CLR0' conkyctl color0 COLOR_0 '$me' ${1})") + [[ "$CLR1" != "#" ]] && out+=(" AbCd $COLOR 1,^pipe(mbclr '$CLR1' conkyctl color1 COLOR_1 '$me' ${1})") + [[ "$CLR2" != "#" ]] && out+=(" AbCd $COLOR 2,^pipe(mbclr '$CLR2' conkyctl color2 COLOR_2 '$me' ${1})") out+=("^sep()") fi if [ "$WINTRANS" == false ];then - out+=(" AbCd Background,^checkout(transsingle)") + out+=(" AbCd $BACKGROUND,^checkout(transsingle)") else - out+=("transparent Background,^checkout(transsingle)") + out+=("transparent $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+=(" Background color,^pipe(mbclr '$WINCLR' conkyctl win_bgcolor WIN_BGCOLOR '$me' ${1})") + out2+=(" $BACKGROUND,^pipe(mbclr '$WINCLR' conkyctl win_bgcolor WIN_BGCOLOR '$me' ${1})") if [[ "$1" != *"logo_mbcolor"* ]]; then if [[ "$1" != *"quoter_mbcolor"* ]]; then - out+=("FONT [ $FONT $FONTSIZE ],^checkout(fontsingle)") + out+=("$FONTS [ $FONT $FONTSIZE ],^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+=("++ Increase,conkyctl basefont_inc ${1};$me") - out2+=("-- Decrease,conkyctl basefont_dec ${1};$me") + out2+=("++ $INCREASE,conkyctl basefont_inc ${1};$me") + out2+=("-- $DECREASE,conkyctl basefont_dec ${1};$me") fi - out+=("Outline/Shadow [ $SHADOWS ],^checkout(outline2)") + out+=("$OLINE/$SHADOW [ $SHADOWS ],^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 [ $BORD $STIP ],^checkout(bordersingle)") + out+=("$BORDERS [ $BORD $STIP ],^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";; diff --git a/bin/jgctl b/bin/jgctl index 9c97fb1..c2ab530 100755 --- a/bin/jgctl +++ b/bin/jgctl @@ -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} diff --git a/bin/prtctl b/bin/prtctl index 9b28916..b389c57 100755 --- a/bin/prtctl +++ b/bin/prtctl @@ -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:\nexported_${DATE}.pyradio-theme\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 diff --git a/bin/w2theme b/bin/w2theme index 411c082..59bdd38 100755 --- a/bin/w2theme +++ b/bin/w2theme @@ -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 diff --git a/share/mabox-colorizer/help/en.html b/share/mabox-colorizer/help/en.html index 36f6cdd..36e5d8d 100644 --- a/share/mabox-colorizer/help/en.html +++ b/share/mabox-colorizer/help/en.html @@ -41,14 +41,16 @@ div.fixeddown {
-

Mabox Colorizer

+

Mabox Colorizer beta

a set of tools to easily customize your Mabox Linux Desktop

Easily change look and feel of:

+

NEW!!

Automatically generate themes for all above from Wallpaper colors

Launch Colorizer
diff --git a/share/mabox-colorizer/help/pl.html b/share/mabox-colorizer/help/pl.html index 4c1b10f..4d4b103 100644 --- a/share/mabox-colorizer/help/pl.html +++ b/share/mabox-colorizer/help/pl.html @@ -41,14 +41,16 @@ div.fixeddown {
-

Mabox Colorizer

+

Mabox Colorizer beta

a tool to easily customize your Mabox Linux Desktop

Easily change look and feel of:

+

NEW!!

Automatically generate themes for all above from Wallpaper colors

Launch Colorizer