polishing

This commit is contained in:
Daniel Napora 2023-09-06 16:13:11 +02:00
parent f7f4329633
commit 0640f531a0
9 changed files with 130 additions and 76 deletions

View File

@ -301,25 +301,25 @@ fi
out+=("^sep()") out+=("^sep()")
out+=(" $COLORIZE,^pipe(randomizer c)") out+=(" $COLORIZE,^pipe(randomizer c)")
out+=("^sep($MODULES)") out+=("^sep($MODULES)")
out+=("<big></big> $FONTS,^pipe(colorizer-fonts)") out+=("<big></big> $FONTS,colorizer-fonts -s")
out+=("^sep()") out+=("^sep()")
out+=("$OBTHEME,^pipe(colorizer-ob)") out+=("$OBTHEME,colorizer-ob -s")
#out+=("TINT2,^pipe(colorizer-tint2)") #out+=("TINT2,^pipe(colorizer-tint2)")
out+=("$MENUPANELS,^pipe(colorizer-menus)") out+=("$MENUPANELS,colorizer-menus -s")
out+=("Conky Manager,^pipe(colorizer-conky)") out+=("Conky Manager,colorizer-conky -s")
out+=("^sep()")
#out+=("Systray HW monitor,^pipe(colorizer-phwmon)") #out+=("Systray HW monitor,^pipe(colorizer-phwmon)")
if pgrep -f pyradio >/dev/null ;then #if pgrep -f pyradio >/dev/null ;then
out+=("^sep()") # out+=("^sep()")
out+=("PyRadio,^pipe(colorizer-pyradio)") out+=("PyRadio,colorizer-pyradio -s")
fi #fi
if pgrep -f cava >/dev/null ;then #if pgrep -f cava >/dev/null ;then
out+=("^sep()") # out+=("^sep()")
out+=("$CAVA,^pipe(colorizer-cava)") out+=("$CAVA,colorizer-cava -s")
fi #fi
out+=("^sep($WALLCOLORS)") out+=("^sep($WALLCOLORS)")
@ -721,7 +721,7 @@ if [[ "$1" == "-s" ]]; then
n=0 n=0
m=0 m=0
X=$((jgtools_padding + 4)) X=$((jgtools_padding + 4))
Y=$((jgtools_padding + 100)) Y=$((jgtools_padding + 96))
for i in "${w[@]}" for i in "${w[@]}"
do do
if [[ "$n" -lt "10" ]];then if [[ "$n" -lt "10" ]];then
@ -756,9 +756,9 @@ fi
cat <<EOF > ${MENU_ITEMS} cat <<EOF > ${MENU_ITEMS}
@icon,,$((jgtools_padding)),$((jgtools_padding)),270,150,4,left,top,,,${THUMB} @icon,,$((jgtools_padding)),$((jgtools_padding)),270,150,4,left,top,,,${THUMB}
@rect,,$((jgtools_padding)),$((jgtools_padding + 4)),270,20,0,left,top,#222222 20,#222222 70, @rect,,$((jgtools_padding)),$((jgtools_padding + 4)),270,20,0,left,top,#222222 20,#222222 70,
@rect,,$((jgtools_padding)),$((jgtools_padding + 116)),270,34,0,left,top,#222222 20,#222222 70, @rect,,$((jgtools_padding)),$((jgtools_padding + 114)),270,32,0,left,top,#222222 20,#222222 70,
@text,,$((jgtools_padding + 12)),$((jgtools_padding)),270,30,0,left,top,#FFFFFF ,${WINCLR}, <span size='10400' font_family='Ubuntu'><small>${THGEN}</small> <span fgcolor='$FGCOL'><b>$STATE</b></span></span> @text,,$((jgtools_padding + 12)),$((jgtools_padding)),270,30,0,left,top,#FFFFFF ,${WINCLR}, <span size='10400' font_family='Ubuntu'><small>${THGEN}</small> <span fgcolor='$FGCOL'><b>$STATE</b></span></span>
@text,,$((jgtools_padding + 194)),$((jgtools_padding + 120)),120,30,0,left,top,#FFFFFF ,${WINCLR},<span size='10400' font_family='Ubuntu'><b>Colorizer</b></span> @text,,$((jgtools_padding + 168)),$((jgtools_padding + 116)),120,30,0,left,top,#FFFFFF ,${WINCLR},<span size='10400' font_family='Ubuntu'><b>Colorizer</b></span>
$(printf '%s\n' "${dots[@]}") $(printf '%s\n' "${dots[@]}")
#@icon,,$((jgtools_padding + 4)),$((jgtools_padding + 34)),270,120,4,left,top,,,/usr/share/mabox-colorizer/img/colorizer.png #@icon,,$((jgtools_padding + 4)),$((jgtools_padding + 34)),270,120,4,left,top,,,/usr/share/mabox-colorizer/img/colorizer.png
$(printf '%s\n' "${out[@]}") $(printf '%s\n' "${out[@]}")

View File

@ -70,6 +70,7 @@ Możesz je więc <b>przesuwać</b> lub <b>zmieniać rozmiar</b> tak jak każde i
EDITCONF="Edytuj plik konfiguracyjny" EDITCONF="Edytuj plik konfiguracyjny"
RELOAD="Przeładuj konfigurację" RELOAD="Przeładuj konfigurację"
RELOAD_COLORS="Przeładuj kolory" RELOAD_COLORS="Przeładuj kolory"
_COLORIZER_ROOT="<b>Colorizer</b> - menu główne"
;; ;;
*) *)
INFO="CaVa tips &amp; tricks" INFO="CaVa tips &amp; tricks"
@ -99,7 +100,7 @@ So you can <b>move</b> or <b>resize</b> it like any other window\n \
EDITCONF="Edit config file" EDITCONF="Edit config file"
RELOAD="Reload config" RELOAD="Reload config"
RELOAD_COLORS="Reload colors only" RELOAD_COLORS="Reload colors only"
_COLORIZER_ROOT="<b>Colorizer</b> rootmenu"
;; ;;
esac esac
@ -169,7 +170,7 @@ if [[ "$1" == "-s" ]]; then
source "$CNF_FILE" source "$CNF_FILE"
out+=("^sep()") out+=("^sep()")
out+=(" ${arrow_string_left} Colorizer,colorizer -s") out+=(" ${arrow_string_left} $_COLORIZER_ROOT,colorizer -s")
if [[ "$colorizer_size" == "full" ]];then if [[ "$colorizer_size" == "full" ]];then
eval $(xdotool getdisplaygeometry --shell) eval $(xdotool getdisplaygeometry --shell)

View File

@ -22,6 +22,8 @@ CONKYDIR="$HOME/.config/conky"
BASECONKY="$CONKYDIR/sysinfo_mbcolor.conkyrc" BASECONKY="$CONKYDIR/sysinfo_mbcolor.conkyrc"
COLORIZERDIR="$HOME/.config/colorizer" COLORIZERDIR="$HOME/.config/colorizer"
CONKYTHEMEDIR="$COLORIZERDIR/conky/themes" CONKYTHEMEDIR="$COLORIZERDIR/conky/themes"
if [ ! -d "$CONKYTHEMEDIR" ];then if [ ! -d "$CONKYTHEMEDIR" ];then
mkdir -p "$CONKYTHEMEDIR" mkdir -p "$CONKYTHEMEDIR"
@ -45,6 +47,23 @@ update_notifications=true
EOF EOF
fi fi
### Wallpaper colors
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"
case "$LANG" in case "$LANG" in
pl*) pl*)
COLORIZECONKY="Conky Manager" COLORIZECONKY="Conky Manager"
@ -91,6 +110,7 @@ case "$LANG" in
RESETALL="Resetuj wszystkie" RESETALL="Resetuj wszystkie"
RESETCOLORS="Przywróć domyślne kolory" RESETCOLORS="Przywróć domyślne kolory"
AREYOUSURE="Czy aby napewno?" AREYOUSURE="Czy aby napewno?"
_COLORIZER_ROOT="<b>Colorizer</b> - menu główne"
;; ;;
*) *)
COLORIZECONKY="Conky Manager" COLORIZECONKY="Conky Manager"
@ -137,6 +157,7 @@ case "$LANG" in
RESETALL="Reset all to defaults" RESETALL="Reset all to defaults"
RESETCOLORS="Restore default colors" RESETCOLORS="Restore default colors"
AREYOUSURE="Are you sure?" AREYOUSURE="Are you sure?"
_COLORIZER_ROOT="<b>Colorizer</b> rootmenu"
;; ;;
esac esac
@ -171,8 +192,8 @@ if pgrep -u $USER -af "conky.*mbcolor" >/dev/null; then
getvalues getvalues
[[ "$WINTRANS" == false ]] && BG="bgcolor='$WINCLR'" || BG="" [[ "$WINTRANS" == false ]] && BG="bgcolor='$WINCLR'" || BG=""
out+=("^sep($COLORIZECONKY)") #out+=("^sep($COLORIZECONKY)")
out+=(" $MOVEABLEALL,conkyctl makemoveableall")
#while read -r pid b c confpath #while read -r pid b c confpath
#do #do
@ -262,42 +283,29 @@ if pgrep -u $USER -af "conky.*mbcolor" >/dev/null; then
#GLOBAL START #GLOBAL START
out+=("^sep($GLOBALSETTINGS)") out+=("^sep($GLOBALSETTINGS)")
out+=(" $MOVEABLEALL,conkyctl makemoveableall")
if [ "$WINTRANS" == false ];then
out+=("<small><span bgcolor='$WINCLR'> </span><span weight='bold' ${BG} fgcolor='$WINCLR'> AbCd </span></small> $BACKGROUND,^pipe(mbclr '$WINCLR' conkyctl win_bgcolor_all '${BACKGROUND}' '$me')")
else
out+=("<small><span bgcolor='$WINCLR'> transparent </span></small> $BACKGROUND,^pipe(mbclr '$WINCLR' conkyctl win_bgcolor_all '${BACKGROUND}' '$me')")
fi
[[ "$WINTRANS" == false ]] && out+=("<big>󰄱</big> $TRANSPARENT,conkyctl transparent_all true;$me") || out+=("<big>󰄲</big> $TRANSPARENT,conkyctl transparent_all false;$me")
out+=("^sep()") out+=("^sep()")
out+=("<big><span bgcolor='$WINCLR'> <span fgcolor='$CLR'></span> <span fgcolor='$CLR0'></span> <span fgcolor='$CLR1'></span> <span fgcolor='$CLR2'></span> </span></big> $REGENERATE,^checkout(regenconky)")
out+=("<small><span bgcolor='$CLR'> </span><span weight='bold' ${BG} fgcolor='$CLR'> AbCd </span></small> $DEFCOLOR,^pipe(mbclr '$CLR' conkyctl default_color_all '${DEFCOLOR}' '$me')")
out+=("<small><span bgcolor='$CLR0'> </span><span weight='bold' ${BG} fgcolor='$CLR0'> AbCd </span></small> $COLOR_0,^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,^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,^pipe(mbclr '$CLR2' conkyctl color2_all '${COLOR_2}' '$me')")
#out+=("^sep()")
out+=("^sep()")
out+=("<span bgcolor='#282828'> <span fgcolor='#ebdbb2'></span> <span fgcolor='#98971a'></span> <span fgcolor='#d79921'></span> <span fgcolor='#cc241d'></span> </span> $REGENERATE,^checkout(regenconky)")
out2+=("^tag(regenconky)") out2+=("^tag(regenconky)")
out2+=("^sep($REGENERATE)") out2+=("^sep($REGENERATE)")
out2+=("^sep($GENERATEFROMWP)")
out2+=("$LIGHTBG,w2theme conky light;$me")
out2+=("$DARKBG,w2theme conky dark;$me")
out2+=("^sep($APPLY_THEME)") out2+=("^sep($APPLY_THEME)")
for i in "${COLORIZERDIR}"/conky/themes/*.colors for i in "${COLORIZERDIR}"/conky/themes/*.colors
do do
source "${i}" source "${i}"
themefilename=${i##*/} themefilename=${i##*/}
themename=${themefilename%%.col*} themename=${themefilename%%.col*}
out2+=("<span bgcolor='$own_window_colour'> <span fgcolor='$default_color'></span> <span fgcolor='$color0'></span> <span fgcolor='$color1'></span> <span fgcolor='$color2'></span> </span> $themename,conkyctl settheme_all $themefilename;$me") out2+=("<tt>$(printf '%-20s' "${themename}")</tt><big><span bgcolor='$own_window_colour'> <span fgcolor='$default_color'>󰯲</span> <span fgcolor='$color0'>󰝥</span> <span fgcolor='$color1'>󰲠</span> <span fgcolor='$color2'>󰲢</span> </span></big>,conkyctl settheme_all $themefilename;$me")
done done
out2+=("^sep()") out2+=("^sep()")
out2+=(" $OPENTHEMEDIR,xdg-open ${COLORIZERDIR}/conky/themes/") out2+=(" $OPENTHEMEDIR,xdg-open ${COLORIZERDIR}/conky/themes/")
out2+=("^sep($GENERATEFROMWP)")
out2+=("<big><span bgcolor='${w[-1]}' fgcolor='${w[0]}'> $LIGHTBG <span fgcolor='${w[4]}'></span> <span fgcolor='${w[5]}'></span> </span></big>,w2theme conky light;$me")
out2+=("<big><span bgcolor='${w[0]}' fgcolor='${w[-1]}'> $DARKBG <span fgcolor='${w[-4]}'></span> <span fgcolor='${w[-5]}'></span> </span></big>,w2theme conky dark;$me")
out+=("^sep()") out+=("^sep()")
out+=("<big>󰛖</big> $FONTS [ <b><span font_family=\"${FONT}\">$FONT</span> $FONTSIZE</b> ],^checkout(font)") out+=("<big>󰛖</big> $FONTS [ <b><span font_family=\"${FONT}\">$FONT</span> $FONTSIZE</b> ],^checkout(font)")
out2+=("^tag(font)") out2+=("^tag(font)")
out2+=("^sep($FONTS)") out2+=("^sep($FONTS)")
@ -347,12 +355,31 @@ if pgrep -u $USER -af "conky.*mbcolor" >/dev/null; then
[[ "$STIP" == 3 ]] && out2+=("<big>綠</big> 3 px,conkyctl stippled_borders_all 3;$me") || out2+=("<big>祿</big> 3 px,conkyctl stippled_borders_all 3;$me") [[ "$STIP" == 3 ]] && out2+=("<big>綠</big> 3 px,conkyctl stippled_borders_all 3;$me") || out2+=("<big>祿</big> 3 px,conkyctl stippled_borders_all 3;$me")
[[ "$STIP" == 4 ]] && out2+=("<big>綠</big> 4 px,conkyctl stippled_borders_all 4;$me") || out2+=("<big>祿</big> 4 px,conkyctl stippled_borders_all 4;$me") [[ "$STIP" == 4 ]] && out2+=("<big>綠</big> 4 px,conkyctl stippled_borders_all 4;$me") || out2+=("<big>祿</big> 4 px,conkyctl stippled_borders_all 4;$me")
out+=("^sep()")
if [ "$WINTRANS" == false ];then
out+=("<span bgcolor='$WINCLR'> </span><span weight='bold' ${BG} fgcolor='$WINCLR'> AbCd </span> $BACKGROUND,^pipe(mbclr '$WINCLR' conkyctl win_bgcolor_all '${BACKGROUND}' '$me')")
else
out+=("<span> transparent </span> $BACKGROUND,^pipe(mbclr '$WINCLR' conkyctl win_bgcolor_all '${BACKGROUND}' '$me')")
fi
[[ "$WINTRANS" == false ]] && out+=("<big>󰄱</big> $TRANSPARENT,conkyctl transparent_all true;$me") || out+=("<big>󰄲</big> $TRANSPARENT,conkyctl transparent_all false;$me")
out+=("^sep()")
out+=("^sep($RESET)")
out+=("󰁯 $RESETCOLORS,^checkout(resetcolors)") out+=("<span bgcolor='$CLR'> </span><span weight='bold' ${BG} fgcolor='$CLR'> AbCd </span> $DEFCOLOR,^pipe(mbclr '$CLR' conkyctl default_color_all '${DEFCOLOR}' '$me')")
out2+=("^tag(resetcolors)") out+=("<span bgcolor='$CLR0'> </span><span weight='bold' ${BG} fgcolor='$CLR0'> AbCd </span> $COLOR_0,^pipe(mbclr '$CLR0' conkyctl color0_all '${COLOR_0}' '$me')")
out2+=("^sep($AREYOUSURE)") out+=("<span bgcolor='$CLR1'> </span><span weight='bold' ${BG} fgcolor='$CLR1'> AbCd </span> $COLOR_1,^pipe(mbclr '$CLR1' conkyctl color1_all '${COLOR_1}' '$me')")
out2+=("$YES,conkyctl resetcolorsall;$me") out+=("<span bgcolor='$CLR2'> </span><span weight='bold' ${BG} fgcolor='$CLR2'> AbCd </span> $COLOR_2,^pipe(mbclr '$CLR2' conkyctl color2_all '${COLOR_2}' '$me')")
#out+=("^sep()")
#out+=("^sep($RESET)")
#out+=("󰁯 $RESETCOLORS,^checkout(resetcolors)")
#out2+=("^tag(resetcolors)")
#out2+=("^sep($AREYOUSURE)")
#out2+=("$YES,conkyctl resetcolorsall;$me")
#out+=(" $RESETALL,^checkout(resetall)") NOT SAFE!!! #out+=(" $RESETALL,^checkout(resetall)") NOT SAFE!!!
#out2+=("^tag(resetall)") #out2+=("^tag(resetall)")
#out2+=("^sep($AREYOUSURE)") #out2+=("^sep($AREYOUSURE)")
@ -388,7 +415,7 @@ if [[ "$1" == "-s" ]]; then
source $HOME/.config/colorizer/colorizer.conf source $HOME/.config/colorizer/colorizer.conf
out+=("^sep()") out+=("^sep()")
out+=(" ${arrow_string_left} Colorizer,colorizer -s") out+=(" ${arrow_string_left} $_COLORIZER_ROOT,colorizer -s")
if [[ "$colorizer_size" == "full" ]];then if [[ "$colorizer_size" == "full" ]];then
eval $(xdotool getdisplaygeometry --shell) eval $(xdotool getdisplaygeometry --shell)
@ -431,7 +458,7 @@ cat <<EOF > ${MENU_ITEMS}
@icon,,$((jgtools_padding)),$((jgtools_padding)),270,150,4,left,top,,,${THUMB} @icon,,$((jgtools_padding)),$((jgtools_padding)),270,150,4,left,top,,,${THUMB}
@rect,,$((jgtools_padding)),$((jgtools_padding + 112)),270,34,0,left,top,#222222 20,#222222 70, @rect,,$((jgtools_padding)),$((jgtools_padding + 112)),270,34,0,left,top,#222222 20,#222222 70,
#@icon,,$((jgtools_padding + 4)),$((jgtools_padding + 4)),270,150,4,left,top,,,/usr/share/mabox-colorizer/img/colorizer-conky.png #@icon,,$((jgtools_padding + 4)),$((jgtools_padding + 4)),270,150,4,left,top,,,/usr/share/mabox-colorizer/img/colorizer-conky.png
@text,,$((jgtools_padding + 154)),$((jgtools_padding + 116)),120,30,0,left,top,#FFFFFF ,${WINCLR},<span size='10400' font_family='Ubuntu'><b>Colorizer</b> Conky</span> @text,,$((jgtools_padding + 80)),$((jgtools_padding + 116)),190,30,0,left,top,#FFFFFF ,${WINCLR},<span size='10400' font_family='Ubuntu'><b>Conky</b> Manager &amp; Colorizer</span>
@rect,,$((jgtools_padding + 239)),$((jgtools_padding + 2)),29,60,0,left,top,#FFFFFF 30,${WINCLR} 60, @rect,,$((jgtools_padding + 239)),$((jgtools_padding + 2)),29,60,0,left,top,#FFFFFF 30,${WINCLR} 60,
@rect,,$((jgtools_padding + 2)),$((jgtools_padding + 88)),29,60,0,left,top,#FFFFFF 30,${WINCLR} 60, @rect,,$((jgtools_padding + 2)),$((jgtools_padding + 88)),29,60,0,left,top,#FFFFFF 30,${WINCLR} 60,
@rect,,$((jgtools_padding + 34)),$((jgtools_padding + 108)),29,40,0,left,top,#FFFFFF 30,${WINCLR} 60, @rect,,$((jgtools_padding + 34)),$((jgtools_padding + 108)),29,40,0,left,top,#FFFFFF 30,${WINCLR} 60,

View File

@ -69,6 +69,7 @@ case "$LANG" in
_FAVORITE_LBL="Ulubione czcionki" _FAVORITE_LBL="Ulubione czcionki"
_USE="Użyj czcionki" _USE="Użyj czcionki"
_FOR="dla..." _FOR="dla..."
_COLORIZER_ROOT="<b>Colorizer</b> - menu główne"
;; ;;
*) *)
_INCREASE_ALL="Increase all" _INCREASE_ALL="Increase all"
@ -105,7 +106,7 @@ case "$LANG" in
_FAVORITE_LBL="Favorite Fonts" _FAVORITE_LBL="Favorite Fonts"
_USE="Use" _USE="Use"
_FOR="font for ..." _FOR="font for ..."
_COLORIZER_ROOT="<b>Colorizer</b> rootmenu"
;; ;;
esac esac
@ -306,7 +307,7 @@ if [ "${#favfonts[@]}" -gt 0 ];then
done done
fi fi
out2+=("^sep()") out2+=("^sep()")
out2+=("<small> Edit favorited fonts list</small>,geany ~/.config/mabox/fonts.list") out2+=("<small> $_EDIT_FAVFONTS</small>,geany ~/.config/mabox/fonts.list")
out2+=("^sep($_C_EFFCTS)") out2+=("^sep($_C_EFFCTS)")
[[ "$SHADOWS" == "shadow" ]] && out2+=("<big>󰄲</big> $_SHADOW,conkyctl shades_all no;$me") || out2+=("<big>󰄱</big> $_SHADOW,conkyctl shades_all shadow;$me") [[ "$SHADOWS" == "shadow" ]] && out2+=("<big>󰄲</big> $_SHADOW,conkyctl shades_all no;$me") || out2+=("<big>󰄱</big> $_SHADOW,conkyctl shades_all shadow;$me")
@ -348,7 +349,7 @@ if [[ "$1" == "-s" ]]; then
source "$CNF_FILE" source "$CNF_FILE"
out+=("^sep()") out+=("^sep()")
out+=(" ${arrow_string_left} Colorizer,colorizer -s") out+=(" ${arrow_string_left} $_COLORIZER_ROOT,colorizer -s")
if [[ "$colorizer_size" == "full" ]];then if [[ "$colorizer_size" == "full" ]];then
eval $(xdotool getdisplaygeometry --shell) eval $(xdotool getdisplaygeometry --shell)

View File

@ -143,6 +143,7 @@ case "$LANG" in
EDIT="Edytuj plik " EDIT="Edytuj plik "
FILE="plik" FILE="plik"
SET_RANDOM="Ustaw losowy motyw menu" SET_RANDOM="Ustaw losowy motyw menu"
_COLORIZER_ROOT="<b>Colorizer</b> - menu główne"
;; ;;
*) *)
MENU_THEME="Menu theme" MENU_THEME="Menu theme"
@ -223,6 +224,7 @@ case "$LANG" in
EDIT="Edit" EDIT="Edit"
FILE="file" FILE="file"
SET_RANDOM="Set random menu theme" SET_RANDOM="Set random menu theme"
_COLORIZER_ROOT="<b>Colorizer</b> rootmenu"
;; ;;
esac esac
@ -576,7 +578,7 @@ if [[ "$1" == "-s" ]]; then
source "$CNF_FILE" source "$CNF_FILE"
out+=("^sep()") out+=("^sep()")
out+=(" ${arrow_string_left} Colorizer,colorizer -s") out+=(" ${arrow_string_left} $_COLORIZER_ROOT,colorizer -s")
if [[ "$colorizer_size" == "full" ]];then if [[ "$colorizer_size" == "full" ]];then
eval $(xdotool getdisplaygeometry --shell) eval $(xdotool getdisplaygeometry --shell)

View File

@ -100,6 +100,7 @@ case "$LANG" in
NOT_SUPORTED_OBTHEME="Nie wspierany motyw" NOT_SUPORTED_OBTHEME="Nie wspierany motyw"
UNLOCK="odblokuj swoją kreatywność..." UNLOCK="odblokuj swoją kreatywność..."
SWITCH_TO_MBCOLORS="Przełącz na <b>MBColors</b>" SWITCH_TO_MBCOLORS="Przełącz na <b>MBColors</b>"
_COLORIZER_ROOT="<b>Colorizer</b> - menu główne"
;; ;;
*) *)
OBTHEME_LBL="OpenBox theme" OBTHEME_LBL="OpenBox theme"
@ -165,6 +166,7 @@ case "$LANG" in
NOT_SUPORTED_OBTHEME="Theme not supported" NOT_SUPORTED_OBTHEME="Theme not supported"
UNLOCK="Unlock your creativity..." UNLOCK="Unlock your creativity..."
SWITCH_TO_MBCOLORS="Switch to <b>MBColors</b>" SWITCH_TO_MBCOLORS="Switch to <b>MBColors</b>"
_COLORIZER_ROOT="<b>Colorizer</b> rootmenu"
;; ;;
esac esac
@ -509,7 +511,7 @@ if [[ "$1" == "-s" ]]; then
source $HOME/.config/colorizer/colorizer.conf source $HOME/.config/colorizer/colorizer.conf
out+=("^sep()") out+=("^sep()")
out+=(" ${arrow_string_left} Colorizer,colorizer -s") out+=(" ${arrow_string_left} $_COLORIZER_ROOT,colorizer -s")
if [[ "$colorizer_size" == "full" ]];then if [[ "$colorizer_size" == "full" ]];then

View File

@ -70,6 +70,7 @@ case "$LANG" in
EDITCONF="Edytuj plik konfiguracyjny" EDITCONF="Edytuj plik konfiguracyjny"
EDITSTATIONS="Edytuj listę stacji" EDITSTATIONS="Edytuj listę stacji"
CONFIGDIR="Katalog z konfiguracją" CONFIGDIR="Katalog z konfiguracją"
_COLORIZER_ROOT="<b>Colorizer</b> - menu główne"
;; ;;
*) *)
COLORIZE_PYRADIO="Colorize PyRadio" COLORIZE_PYRADIO="Colorize PyRadio"
@ -89,6 +90,7 @@ case "$LANG" in
EDITCONF="Edit config file" EDITCONF="Edit config file"
EDITSTATIONS="Edit stations list" EDITSTATIONS="Edit stations list"
CONFIGDIR="Config Dir" CONFIGDIR="Config Dir"
_COLORIZER_ROOT="<b>Colorizer</b> rootmenu"
;; ;;
esac esac
@ -185,7 +187,7 @@ if [[ "$1" == "-s" ]]; then
source "$CNF_FILE" source "$CNF_FILE"
out+=("^sep()") out+=("^sep()")
out+=(" ${arrow_string_left} Colorizer,colorizer -s") out+=(" ${arrow_string_left} $_COLORIZER_ROOT,colorizer -s")
if [[ "$colorizer_size" == "full" ]];then if [[ "$colorizer_size" == "full" ]];then
eval $(xdotool getdisplaygeometry --shell) eval $(xdotool getdisplaygeometry --shell)

View File

@ -403,8 +403,8 @@ languages () {
APPLY_TO_ALL="Zastosuj do wszystkich" APPLY_TO_ALL="Zastosuj do wszystkich"
NEWTHEME="Nowy motyw kolorów..." NEWTHEME="Nowy motyw kolorów..."
SAVENEWTHEME="utwórz nowy motyw..." SAVENEWTHEME="utwórz nowy motyw..."
LIGHTBG="<b>light</b> - jasne tło" LIGHTBG="Jasne tło"
DARKBG="<b>dark</b> - ciemne tło" DARKBG="Ciemne tło"
RESETCOLORS="Przywróć domyślne kolory" RESETCOLORS="Przywróć domyślne kolory"
GENFROMWP="Generuj z kolorów tapety" GENFROMWP="Generuj z kolorów tapety"
TRANSPARENT="Przezroczyste tło?" TRANSPARENT="Przezroczyste tło?"
@ -466,8 +466,8 @@ languages () {
APPLY_TO_ALL="Apply to All" APPLY_TO_ALL="Apply to All"
NEWTHEME="New Color scheme..." NEWTHEME="New Color scheme..."
SAVENEWTHEME="from current colors..." SAVENEWTHEME="from current colors..."
LIGHTBG="<b>light</b>" LIGHTBG="Light Background"
DARKBG="<b>dark</b>" DARKBG="Dark Background"
RESETCOLORS="Restore default colors" RESETCOLORS="Restore default colors"
GENFROMWP="Generate from wallpaper" GENFROMWP="Generate from wallpaper"
TRANSPARENT="Transparent background?" TRANSPARENT="Transparent background?"
@ -529,8 +529,8 @@ languages () {
APPLY_TO_ALL="Apply to All" APPLY_TO_ALL="Apply to All"
NEWTHEME="New Color scheme..." NEWTHEME="New Color scheme..."
SAVENEWTHEME="from current colors..." SAVENEWTHEME="from current colors..."
LIGHTBG="<b>light</b>" LIGHTBG="Light Background"
DARKBG="<b>dark</b>" DARKBG="Dark Background"
RESETCOLORS="Restore default colors" RESETCOLORS="Restore default colors"
GENFROMWP="Generate from wallpaper" GENFROMWP="Generate from wallpaper"
TRANSPARENT="Transparent background?" TRANSPARENT="Transparent background?"
@ -565,6 +565,23 @@ languages () {
single () { single () {
unset NOT_SUPPORTED OLD_SYNTAX unset NOT_SUPPORTED OLD_SYNTAX
### Wallpaper colors
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"
languages languages
filename=${1##*/} filename=${1##*/}
name=${filename%%_mb*} name=${filename%%_mb*}
@ -732,9 +749,7 @@ if [[ "$OLD_SYNTAX" = "true" ]];then
out2+=("^tag(regensingle)") out2+=("^tag(regensingle)")
out2+=("^sep($COLORSCHEME)") out2+=("^sep($COLORSCHEME)")
out2+=("$RESETCOLORS,conkyctl resetcolorsone ${1}") out2+=("$RESETCOLORS,conkyctl resetcolorsone ${1}")
out2+=("^sep($GENFROMWP)")
out2+=("$LIGHTBG,w2theme conkyone light ${1}")
out2+=("$DARKBG,w2theme conkyone dark ${1}")
out2+=("^sep($APPLY_THEME)") out2+=("^sep($APPLY_THEME)")
out3+=("^tag(applytoall)") out3+=("^tag(applytoall)")
@ -747,13 +762,18 @@ if [[ "$OLD_SYNTAX" = "true" ]];then
ltitle=${themename//-/ } ltitle=${themename//-/ }
arr=( $ltitle ) arr=( $ltitle )
schemetitle=${arr[@]^} schemetitle=${arr[@]^}
out2+=("<span bgcolor='$own_window_colour'> <span fgcolor='$default_color'></span> <span fgcolor='$color0'></span> <span fgcolor='$color1'></span> <span fgcolor='$color2'></span> </span> $schemetitle,conkyctl settheme $themefilename $1") out2+=("<tt>$(printf '%-20s' "${schemetitle}")</tt><big><span bgcolor='$own_window_colour'> <span fgcolor='$default_color'></span> <span fgcolor='$color0'></span> <span fgcolor='$color1'></span> <span fgcolor='$color2'></span> </span></big>,conkyctl settheme $themefilename $1")
out3+=("<span bgcolor='$own_window_colour'> <span fgcolor='$default_color'></span> <span fgcolor='$color0'></span> <span fgcolor='$color1'></span> <span fgcolor='$color2'></span> </span> $schemetitle,conkyctl settheme_all $themefilename") #out2+=("<span bgcolor='$own_window_colour'> <span fgcolor='$default_color'></span> <span fgcolor='$color0'></span> <span fgcolor='$color1'></span> <span fgcolor='$color2'></span> </span> $schemetitle,conkyctl settheme $themefilename $1")
out3+=("<tt>$(printf '%-20s' "${schemetitle}")</tt><big><span bgcolor='$own_window_colour'> <span fgcolor='$default_color'></span> <span fgcolor='$color0'></span> <span fgcolor='$color1'></span> <span fgcolor='$color2'></span> </span></big>,conkyctl settheme_all $themefilename")
#out3+=("<span bgcolor='$own_window_colour'> <span fgcolor='$default_color'></span> <span fgcolor='$color0'></span> <span fgcolor='$color1'></span> <span fgcolor='$color2'></span> </span> $schemetitle,conkyctl settheme_all $themefilename")
done done
out2+=("^sep()") out2+=("^sep()")
out2+=(" $OPENTHEMEDIR,xdg-open ${COLORIZERDIR}/conky/themes/") out2+=(" $OPENTHEMEDIR,xdg-open ${COLORIZERDIR}/conky/themes/")
out2+=("^sep()") out2+=("^sep()")
out2+=("$APPLY_TO_ALL,^checkout(applytoall)") out2+=("$APPLY_TO_ALL,^checkout(applytoall)")
out2+=("^sep($GENFROMWP)")
out2+=("<big><span bgcolor='${w[-1]}' fgcolor='${w[0]}'> $LIGHTBG <span fgcolor='${w[4]}'></span> <span fgcolor='${w[5]}'></span> </span></big>,w2theme conkyone light ${1}")
out2+=("<big><span bgcolor='${w[0]}' fgcolor='${w[-1]}'> $DARKBG <span fgcolor='${w[-4]}'></span> <span fgcolor='${w[-5]}'></span> </span></big>,w2theme conkyone dark ${1}")
if [[ "$1" =~ "sysinfo_" ]]; then if [[ "$1" =~ "sysinfo_" ]]; then
out2+=("^sep($NEWTHEME)") out2+=("^sep($NEWTHEME)")
out2+=("$SAVENEWTHEME,conkyctl newcolorscheme ${1}") out2+=("$SAVENEWTHEME,conkyctl newcolorscheme ${1}")

View File

@ -87,15 +87,15 @@ conky_colors() {
dark) #dark bg dark) #dark bg
conkyctl win_bgcolor_all "${w[0]}" conkyctl win_bgcolor_all "${w[0]}"
conkyctl default_color_all "${w[-1]}" conkyctl default_color_all "${w[-1]}"
conkyctl color0_all "${w[-3]}" conkyctl color0_all "${w[-4]}"
conkyctl color1_all "${w[-4]}" conkyctl color1_all "${w[-5]}"
#conkyctl color2_all "${w[-5]}" #conkyctl color2_all "${w[-5]}"
;; ;;
*) #light bg *) #light bg
conkyctl win_bgcolor_all "${w[-1]}" conkyctl win_bgcolor_all "${w[-1]}"
conkyctl default_color_all "${w[0]}" conkyctl default_color_all "${w[0]}"
conkyctl color0_all "${w[2]}" conkyctl color0_all "${w[4]}"
conkyctl color1_all "${w[4]}" conkyctl color1_all "${w[5]}"
#conkyctl color2_all "${w[6]}" #conkyctl color2_all "${w[6]}"
;; ;;
esac esac
@ -110,18 +110,17 @@ conky_colorsone () {
dark) #dark bg dark) #dark bg
conkyctl win_bgcolor "${w[0]}" "${2}" conkyctl win_bgcolor "${w[0]}" "${2}"
conkyctl default_color "${w[-1]}" "${2}" conkyctl default_color "${w[-1]}" "${2}"
conkyctl color0 "${w[-3]}" "${2}" conkyctl color0 "${w[-4]}" "${2}"
conkyctl color1 "${w[-4]}" "${2}" conkyctl color1 "${w[-5]}" "${2}"
conkyctl color2 "${w[-5]}" "${2}"
;; ;;
*) #light bg *) #light bg
conkyctl win_bgcolor "${w[-1]}" "${2}" conkyctl win_bgcolor "${w[-1]}" "${2}"
conkyctl default_color "${w[0]}" "${2}" conkyctl default_color "${w[0]}" "${2}"
conkyctl color0 "${w[2]}" "${2}" conkyctl color0 "${w[4]}" "${2}"
conkyctl color1 "${w[4]}" "${2}" conkyctl color1 "${w[5]}" "${2}"
conkyctl color2 "${w[6]}" "${2}"
;; ;;
esac esac
conkyctl color2_all "${accents[ $RANDOM % ${#accents[@]} ]}" "${2}"
} }
pyradio_theme() { pyradio_theme() {
case "$1" in case "$1" in