use menu colors,position

master 0.9.27
Daniel Napora 2023-01-10 15:23:33 +01:00
parent 72ad7ba4c1
commit 7f86da54be
1 changed files with 101 additions and 88 deletions

View File

@ -599,31 +599,44 @@ if [[ "$OLD_SYNTAX" = "true" ]];then
out2+=("^tag(position)")
out2+=("^sep($POSITION)")
out2+=(" $MARKNEWPOS,conkyctl setpos ${1};$me")
out2+=("^sep()")
out2+=("$ALIGNMENT [ <b>$POS</b> ],^checkout(posi)")
out3+=("^tag(posi)")
out3+=("^sep($POSITION)")
out3+=(" $TOPLEFT,conkyctl pos top_left ${1};$me")
out3+=(" $TOP,conkyctl pos top_middle ${1};$me")
out3+=(" $TOPRIGHT,conkyctl pos top_right ${1};$me")
out3+=(" $LEFT,conkyctl pos middle_left ${1};$me")
out3+=("$CENTER,conkyctl pos middle_middle ${1};$me")
out3+=(" $RIGHT,conkyctl pos middle_right ${1};$me")
out3+=(" $BOTTOMLEFT,conkyctl pos bottom_left ${1};$me")
out3+=(" $BOTTOM,conkyctl pos bottom_middle ${1};$me")
out3+=(" $BOTTOMRIGHT,conkyctl pos bottom_right ${1};$me")
out2+=("$HORIZONTAL_GAP [ <b>$GAPX</b> ],^checkout(gapx)")
out3+=("^tag(gapx)")
out3+=("^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
out3+=("${i},conkyctl gap_x ${i} ${1};$me")
done
out2+=("$VERTICAL_GAP [ <b>$GAPY</b> ],^checkout(gapy)")
out3+=("^tag(gapy)")
out3+=("^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
out3+=("${i},conkyctl gap_y ${i} ${1};$me")
done
#out2+=("^sep()")
out2+=("^sep($ALIGNMENT)")
out2+=(" $TOPLEFT,conkyctl pos top_left ${1};$me")
out2+=(" $TOP,conkyctl pos top_middle ${1};$me")
out2+=(" $TOPRIGHT,conkyctl pos top_right ${1};$me")
out2+=(" $LEFT,conkyctl pos middle_left ${1};$me")
out2+=("$CENTER,conkyctl pos middle_middle ${1};$me")
out2+=(" $RIGHT,conkyctl pos middle_right ${1};$me")
out2+=(" $BOTTOMLEFT,conkyctl pos bottom_left ${1};$me")
out2+=(" $BOTTOM,conkyctl pos bottom_middle ${1};$me")
out2+=(" $BOTTOMRIGHT,conkyctl pos bottom_right ${1};$me")
#out2+=("$ALIGNMENT [ <b>$POS</b> ],^checkout(posi)")
#out3+=("^tag(posi)")
#out3+=("^sep($POSITION)")
#out3+=(" $TOPLEFT,conkyctl pos top_left ${1};$me")
#out3+=(" $TOP,conkyctl pos top_middle ${1};$me")
#out3+=(" $TOPRIGHT,conkyctl pos top_right ${1};$me")
#out3+=(" $LEFT,conkyctl pos middle_left ${1};$me")
#out3+=("$CENTER,conkyctl pos middle_middle ${1};$me")
#out3+=(" $RIGHT,conkyctl pos middle_right ${1};$me")
#out3+=(" $BOTTOMLEFT,conkyctl pos bottom_left ${1};$me")
#out3+=(" $BOTTOM,conkyctl pos bottom_middle ${1};$me")
#out3+=(" $BOTTOMRIGHT,conkyctl pos bottom_right ${1};$me")
#out2+=("$HORIZONTAL_GAP [ <b>$GAPX</b> ],^checkout(gapx)")
#out3+=("^tag(gapx)")
#out3+=("^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
#out3+=("${i},conkyctl gap_x ${i} ${1};$me")
#done
#out2+=("$VERTICAL_GAP [ <b>$GAPY</b> ],^checkout(gapy)")
#out3+=("^tag(gapy)")
#out3+=("^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
#out3+=("${i},conkyctl gap_y ${i} ${1};$me")
#done
if [[ "$NOT_SUPPORTED" != "true" ]];then
out2+=("^sep()")
out2+=(" $MAKEMOVEABLE,conkyctl makemoveableall")
@ -877,38 +890,38 @@ contextmenu () {
mkconfigfile
if [[ "$OLD_SYNTAX" != "true" ]];then
echo "color_menu_bg_to=${WINCLR} 100" >> ${CONFIG_FILE}
TXTCOLOR=$(pastel textcolor ${WINCLR}|pastel format hex)
#notify-send.sh "TXTCOLOR" "${TXTCOLOR} ${menu_gradient_pos}"
if [ "$TXTCOLOR" == "#ffffff" ];then #bg is dark
TXTCOLOR_NORM="#cccccc"
WINCLR=$(pastel lighten 0.03 ${WINCLR}|pastel format hex)
echo "color_norm_fg=${TXTCOLOR_NORM} 100" >> ${CONFIG_FILE}
echo "color_sel_fg=${TXTCOLOR} 100" >> ${CONFIG_FILE}
echo "color_title_fg=${TXTCOLOR} 60" >> ${CONFIG_FILE}
SELBG=$(pastel darken 0.1 ${WINCLR}|pastel format hex)
echo "color_sel_bg=${SELBG} 80" >> ${CONFIG_FILE}
echo "color_title_bg=${SELBG} 30" >> ${CONFIG_FILE}
echo "color_title_border=${SELBG} 60" >> ${CONFIG_FILE}
else #bg is light
TXTCOLOR_NORM="#333333"
echo "color_norm_fg=${TXTCOLOR_NORM} 100" >> ${CONFIG_FILE}
echo "color_sel_fg=${TXTCOLOR} 100" >> ${CONFIG_FILE}
echo "color_title_fg=${TXTCOLOR} 90" >> ${CONFIG_FILE}
SELBG=$(pastel darken 0.1 ${WINCLR}|pastel format hex)
echo "color_sel_bg=${SELBG} 80" >> ${CONFIG_FILE}
echo "color_title_bg=${SELBG} 90" >> ${CONFIG_FILE}
echo "color_title_border=${SELBG} 90" >> ${CONFIG_FILE}
fi
echo "color_menu_bg=${WINCLR} 90" >> ${CONFIG_FILE}
echo "color_menu_border=${CLR} 60" >> ${CONFIG_FILE}
echo "menu_border=1" >> ${CONFIG_FILE}
echo "menu_radius=0" >> ${CONFIG_FILE}
#if [[ "$OLD_SYNTAX" != "true" ]];then
# echo "color_menu_bg_to=${WINCLR} 100" >> ${CONFIG_FILE}
# TXTCOLOR=$(pastel textcolor ${WINCLR}|pastel format hex)
# #notify-send.sh "TXTCOLOR" "${TXTCOLOR} ${menu_gradient_pos}"
# if [ "$TXTCOLOR" == "#ffffff" ];then #bg is dark
# TXTCOLOR_NORM="#cccccc"
# WINCLR=$(pastel lighten 0.03 ${WINCLR}|pastel format hex)
# echo "color_norm_fg=${TXTCOLOR_NORM} 100" >> ${CONFIG_FILE}
# echo "color_sel_fg=${TXTCOLOR} 100" >> ${CONFIG_FILE}
# echo "color_title_fg=${TXTCOLOR} 60" >> ${CONFIG_FILE}
# SELBG=$(pastel darken 0.1 ${WINCLR}|pastel format hex)
# echo "color_sel_bg=${SELBG} 80" >> ${CONFIG_FILE}
# echo "color_title_bg=${SELBG} 30" >> ${CONFIG_FILE}
# echo "color_title_border=${SELBG} 60" >> ${CONFIG_FILE}
# else #bg is light
# TXTCOLOR_NORM="#333333"
# echo "color_norm_fg=${TXTCOLOR_NORM} 100" >> ${CONFIG_FILE}
# echo "color_sel_fg=${TXTCOLOR} 100" >> ${CONFIG_FILE}
# echo "color_title_fg=${TXTCOLOR} 90" >> ${CONFIG_FILE}
# SELBG=$(pastel darken 0.1 ${WINCLR}|pastel format hex)
# echo "color_sel_bg=${SELBG} 80" >> ${CONFIG_FILE}
# echo "color_title_bg=${SELBG} 90" >> ${CONFIG_FILE}
# echo "color_title_border=${SELBG} 90" >> ${CONFIG_FILE}
# fi
# echo "color_menu_bg=${WINCLR} 90" >> ${CONFIG_FILE}
# echo "color_menu_border=${CLR} 60" >> ${CONFIG_FILE}
# echo "menu_border=1" >> ${CONFIG_FILE}
# echo "menu_radius=0" >> ${CONFIG_FILE}
echo "color_sep_fg=${CLR} 10" >> ${CONFIG_FILE}
echo "font=${FONT} 10" >> ${CONFIG_FILE}
fi
# echo "color_sep_fg=${CLR} 10" >> ${CONFIG_FILE}
# echo "font=${FONT} 10" >> ${CONFIG_FILE}
#fi
cat <<EOF > ${MENU_ITEMS}
$(printf '%s\n' "${out[@]}")
$(printf '%s\n' "${out2[@]}")
@ -979,39 +992,39 @@ cmdmenu () {
mkconfigfile
echo "color_menu_bg_to=${WINCLR} 100" >> ${CONFIG_FILE}
TXTCOLOR=$(pastel textcolor ${WINCLR}|pastel format hex)
#notify-send.sh "TXTCOLOR" "${TXTCOLOR} ${menu_gradient_pos}"
if [ "$TXTCOLOR" == "#ffffff" ];then #bg is dark
TXTCOLOR_NORM="#cccccc"
WINCLR=$(pastel lighten 0.03 ${WINCLR}|pastel format hex)
echo "color_norm_fg=${TXTCOLOR_NORM} 100" >> ${CONFIG_FILE}
echo "color_sel_fg=${TXTCOLOR} 100" >> ${CONFIG_FILE}
echo "color_title_fg=${TXTCOLOR} 60" >> ${CONFIG_FILE}
SELBG=$(pastel darken 0.1 ${WINCLR}|pastel format hex)
echo "color_sel_bg=${SELBG} 80" >> ${CONFIG_FILE}
echo "color_title_bg=${SELBG} 30" >> ${CONFIG_FILE}
echo "color_title_border=${SELBG} 60" >> ${CONFIG_FILE}
else #bg is light
TXTCOLOR_NORM="#333333"
echo "color_norm_fg=${TXTCOLOR_NORM} 100" >> ${CONFIG_FILE}
echo "color_sel_fg=${TXTCOLOR} 100" >> ${CONFIG_FILE}
echo "color_title_fg=${TXTCOLOR} 90" >> ${CONFIG_FILE}
SELBG=$(pastel darken 0.1 ${WINCLR}|pastel format hex)
echo "color_sel_bg=${SELBG} 80" >> ${CONFIG_FILE}
echo "color_title_bg=${SELBG} 90" >> ${CONFIG_FILE}
echo "color_title_border=${SELBG} 90" >> ${CONFIG_FILE}
fi
echo "color_menu_bg=${WINCLR} 90" >> ${CONFIG_FILE}
echo "color_menu_border=${CLR} 60" >> ${CONFIG_FILE}
echo "menu_border=1" >> ${CONFIG_FILE}
echo "menu_radius=0" >> ${CONFIG_FILE}
#echo "color_menu_bg_to=${WINCLR} 100" >> ${CONFIG_FILE}
#TXTCOLOR=$(pastel textcolor ${WINCLR}|pastel format hex)
#####notify-send.sh "TXTCOLOR" "${TXTCOLOR} ${menu_gradient_pos}"
#if [ "$TXTCOLOR" == "#ffffff" ];then #bg is dark
#TXTCOLOR_NORM="#cccccc"
#WINCLR=$(pastel lighten 0.03 ${WINCLR}|pastel format hex)
#echo "color_norm_fg=${TXTCOLOR_NORM} 100" >> ${CONFIG_FILE}
#echo "color_sel_fg=${TXTCOLOR} 100" >> ${CONFIG_FILE}
#echo "color_title_fg=${TXTCOLOR} 60" >> ${CONFIG_FILE}
#SELBG=$(pastel darken 0.1 ${WINCLR}|pastel format hex)
#echo "color_sel_bg=${SELBG} 80" >> ${CONFIG_FILE}
#echo "color_title_bg=${SELBG} 30" >> ${CONFIG_FILE}
#echo "color_title_border=${SELBG} 60" >> ${CONFIG_FILE}
#else #bg is light
#TXTCOLOR_NORM="#333333"
#echo "color_norm_fg=${TXTCOLOR_NORM} 100" >> ${CONFIG_FILE}
#echo "color_sel_fg=${TXTCOLOR} 100" >> ${CONFIG_FILE}
#echo "color_title_fg=${TXTCOLOR} 90" >> ${CONFIG_FILE}
#SELBG=$(pastel darken 0.1 ${WINCLR}|pastel format hex)
#echo "color_sel_bg=${SELBG} 80" >> ${CONFIG_FILE}
#echo "color_title_bg=${SELBG} 90" >> ${CONFIG_FILE}
#echo "color_title_border=${SELBG} 90" >> ${CONFIG_FILE}
#fi
#echo "color_menu_bg=${WINCLR} 90" >> ${CONFIG_FILE}
#echo "color_menu_border=${CLR} 60" >> ${CONFIG_FILE}
#echo "menu_border=1" >> ${CONFIG_FILE}
#echo "menu_radius=0" >> ${CONFIG_FILE}
echo "color_sep_fg=${CLR} 10" >> ${CONFIG_FILE}
echo "font=${FONT} 10" >> ${CONFIG_FILE}
echo "sub_spacing=3" >> ${CONFIG_FILE}
echo "menu_margin_x=3" >> ${CONFIG_FILE}
echo "menu_margin_y=3" >> ${CONFIG_FILE}
#echo "color_sep_fg=${CLR} 10" >> ${CONFIG_FILE}
#echo "font=${FONT} 10" >> ${CONFIG_FILE}
#echo "sub_spacing=3" >> ${CONFIG_FILE}
#echo "menu_margin_x=3" >> ${CONFIG_FILE}
#echo "menu_margin_y=3" >> ${CONFIG_FILE}
#notify-send.sh "CFG" "$(cat $CONFIG_FILE)"
case "$LANG" in
pl*)