icons, colorpicker

master
Daniel Napora 2021-10-25 23:14:07 +02:00
parent 6d34f893e2
commit 59e0ef20a4
20 changed files with 22 additions and 11 deletions

11
bin/mbx
View File

@ -17,7 +17,7 @@ mbx setvar menu_padding=5
mbx setvar item_height_factor=200 mbx setvar item_height_factor=200
mbx setvar "font=\'Noto Sans\'" mbx setvar "font=\'Noto Sans\'"
mbx setvar font_size=13 mbx setvar font_size=13
mbx setvar bgcolor=#252525 mbx setvar color_menu_bg=#252525
mbx ${1} mbx ${1}
} }
@ -30,7 +30,7 @@ menu_padding=5
item_height_factor=200 item_height_factor=200
font='Noto Sans' font='Noto Sans'
font_size=13 font_size=13
bgcolor=#252525 color_menu_bg=#252525
EOF EOF
fi fi
source <(grep = $CNF_FILE) source <(grep = $CNF_FILE)
@ -41,7 +41,7 @@ fg(){
[ "$rgb" -gt 138000 ] && fgcolor="#222222" color_title_fg="#111111" color_sel_fg="#111111" color_sep_fg="#222222 20"|| fgcolor="#EEEEEE" color_title_fg="#FFFFFF" color_sel_fg="#FFFFFF" [ "$rgb" -gt 138000 ] && fgcolor="#222222" color_title_fg="#111111" color_sel_fg="#111111" color_sep_fg="#222222 20"|| fgcolor="#EEEEEE" color_title_fg="#FFFFFF" color_sel_fg="#FFFFFF"
[ "$rgb" -gt 200000 ] && color_sel_bg="#222222 8" color_sel_border="#222222 16" color_title_bg="#222222 8" [ "$rgb" -gt 200000 ] && color_sel_bg="#222222 8" color_sel_border="#222222 16" color_title_bg="#222222 8"
} }
fg "$bgcolor" fg "$color_menu_bg"
[ "$menu_padding" == "0" ] && item_margin_x=0 item_margin_y=0 item_radius=0 item_padding_x=8 [ "$menu_padding" == "0" ] && item_margin_x=0 item_margin_y=0 item_radius=0 item_padding_x=8
configure() { configure() {
@ -91,12 +91,13 @@ color_sel_fg = ${color_sel_fg:-}
color_sel_border = ${color_sel_border:-#eeeeee 40} color_sel_border = ${color_sel_border:-#eeeeee 40}
color_norm_fg = ${fgcolor:-} color_norm_fg = ${fgcolor:-}
color_title_fg = ${color_title_fg:-} color_title_fg = ${color_title_fg:-}
color_menu_bg = ${bgcolor:-#0F2437} color_menu_bg = ${color_menu_bg:-#0F2437}
color_menu_border = #eeeeee 8 color_menu_border = #eeeeee 8
color_title_bg = ${color_title_bg:-"$fgcolor 12"} color_title_bg = ${color_title_bg:-"$fgcolor 12"}
color_title_border = ${color_title_border:-} color_title_border = ${color_title_border:-}
color_sep_fg = ${color_sep_fg:-} color_sep_fg = ${color_sep_fg:-}
icon_theme = ${icon_theme:-Papirus} icon_theme = ${icon_theme:-Papirus}
icon_theme_fallback = ${icon_theme_fallback:-hicolor}
icon_size = ${icon_size:-0} icon_size = ${icon_size:-0}
icon_norm_alpha = 70 icon_norm_alpha = 70
icon_sel_alpha = 100 icon_sel_alpha = 100
@ -259,7 +260,7 @@ cat <<EOF > ${MENU_ITEMS}
@text,,$((menu_padding+40)),$((menu_padding+theight+26)),${twidth},25,4,left,top,${fgcolor} 60,${fgcolor} 12,<span font="12px"><i>a set of lightweight and handy utilities</i></span> @text,,$((menu_padding+40)),$((menu_padding+theight+26)),${twidth},25,4,left,top,${fgcolor} 60,${fgcolor} 12,<span font="12px"><i>a set of lightweight and handy utilities</i></span>
@text,,$((menu_padding+56)),$((menu_padding+theight+38)),${twidth},25,4,left,top,${fgcolor} 60,${fgcolor} 12,<span font="12px"><i>for your X11 window manager</i></span> @text,,$((menu_padding+56)),$((menu_padding+theight+38)),${twidth},25,4,left,top,${fgcolor} 60,${fgcolor} 12,<span font="12px"><i>for your X11 window manager</i></span>
^sep(Utilities) ^sep(Utilities)
Apps menu (main),mbx appsmenu,menu Apps menu (main),mbx appsmenu,mbx-appsmenu
Left SidePanel,mbx lpanel,mbx-lpanel Left SidePanel,mbx lpanel,mbx-lpanel
Right SidePanel,mbx rpanel,mbx-rpanel Right SidePanel,mbx rpanel,mbx-rpanel
Logout Dialog, mbx Logout Dialog, mbx

View File

@ -71,7 +71,7 @@ color_sel_fg = ${color_sel_fg:-}
color_sel_border = ${color_sel_border:-#eeeeee 40} color_sel_border = ${color_sel_border:-#eeeeee 40}
color_norm_fg = ${fgcolor:-} color_norm_fg = ${fgcolor:-}
color_title_fg = ${color_title_fg:-} color_title_fg = ${color_title_fg:-}
color_menu_bg = ${bgcolor:-#0F2437} color_menu_bg = ${color_menu_bg:-#0F2437}
color_menu_border = #eeeeee 8 color_menu_border = #eeeeee 8
color_title_bg = ${color_title_bg:-"$fgcolor 12"} color_title_bg = ${color_title_bg:-"$fgcolor 12"}
color_title_border = ${color_title_border:-} color_title_border = ${color_title_border:-}
@ -107,6 +107,12 @@ setvar() {
echo $1 >> $CNF_FILE echo $1 >> $CNF_FILE
fi fi
} }
pickcolor() {
PAR="mbx ${2}"
color=$(colorpicker --short --one-shot --preview)
${ME} setvar color_menu_bg=${color}
${PAR}
}
main() { main() {
# if $1 brak then standalone # if $1 brak then standalone
@ -166,11 +172,14 @@ main() {
out2+=("^tag(bgcolor)") out2+=("^tag(bgcolor)")
out2+=("^sep(Select BGcolor)") out2+=("^sep(Select BGcolor)")
out2+=("Pick color from screen") if hash colorpicker 2>/dev/null; then
out2+=("Pick color from screen,${ME} pickcolor ${1}")
out2+=("^sep()")
fi
colors="$CNF_DIR/inc/colors.clr" colors="$CNF_DIR/inc/colors.clr"
while read -r color; do while read -r color; do
fgc $color fgc $color
out2+=("<tt><span bgcolor='$color' fgcolor='$fgcolor'><sub> </sub>$color <sup> </sup></span></tt>,mbx setvar bgcolor='$color';$PAR fixed") out2+=("<tt><span bgcolor='$color' fgcolor='$fgcolor'><sub> </sub>$color <sup> </sup></span></tt>,mbx setvar color_menu_bg='$color';$PAR fixed")
done < "$colors" done < "$colors"
out2+=("^tag(menupadding)") out2+=("^tag(menupadding)")
@ -206,7 +215,7 @@ main() {
rpanel) menu_halign="right";; rpanel) menu_halign="right";;
about) menu_halign="center";; about) menu_halign="center";;
esac esac
fg "$bgcolor" fg "$color_menu_bg"
[ "$menu_padding" == "0" ] && item_margin_x=0 item_margin_y=0 item_radius=0 [ "$menu_padding" == "0" ] && item_margin_x=0 item_margin_y=0 item_radius=0
configure configure
cat <<EOF > ${MENU_ITEMS} cat <<EOF > ${MENU_ITEMS}
@ -225,6 +234,7 @@ jgmenu --config-file=${CONFIG_FILE} --csv-file=${MENU_ITEMS} 2>/dev/null
case "$1" in case "$1" in
fonts) fonts "$2";; fonts) fonts "$2";;
setvar) setvar "$2";; setvar) setvar "$2";;
pickcolor) pickcolor "$1" "$2";;
appsmenu|lpanel|rpanel|about) main "$1" "$2";; appsmenu|lpanel|rpanel|about) main "$1" "$2";;
*) main;; *) main;;
esac esac

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 996 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 943 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 317 B

After

Width:  |  Height:  |  Size: 304 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 323 B

After

Width:  |  Height:  |  Size: 300 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 411 B

After

Width:  |  Height:  |  Size: 369 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 394 B

After

Width:  |  Height:  |  Size: 359 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 465 B

After

Width:  |  Height:  |  Size: 363 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 487 B

After

Width:  |  Height:  |  Size: 393 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 514 B

After

Width:  |  Height:  |  Size: 459 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 506 B

After

Width:  |  Height:  |  Size: 401 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 786 B

After

Width:  |  Height:  |  Size: 523 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 698 B

After

Width:  |  Height:  |  Size: 557 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 966 B

After

Width:  |  Height:  |  Size: 606 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 822 B

After

Width:  |  Height:  |  Size: 565 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 819 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 762 B

View File

@ -60,7 +60,7 @@
inkscape:groupmode="layer" inkscape:groupmode="layer"
id="layer1"> id="layer1">
<path <path
style="opacity:0.99;fill:#34be5b;stroke:#999999;stroke-width:2.029;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none;fill-opacity:1" style="opacity:0.99;fill:#34be5b;stroke:#b3b3b3;stroke-width:4.029;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none;fill-opacity:1"
d="M 100,19.916354 C 19.832387,59.934602 19.832387,59.934602 19.832387,59.934602 L 100,100.08397 Z" d="M 100,19.916354 C 19.832387,59.934602 19.832387,59.934602 19.832387,59.934602 L 100,100.08397 Z"
id="path1416" id="path1416"
inkscape:export-filename="/home/napcok/GitLab/mbxutils/share/icons/hicolor/48x48/apps/mbx-lpanel.png" inkscape:export-filename="/home/napcok/GitLab/mbxutils/share/icons/hicolor/48x48/apps/mbx-lpanel.png"

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@ -60,7 +60,7 @@
inkscape:groupmode="layer" inkscape:groupmode="layer"
id="layer1"> id="layer1">
<path <path
style="opacity:0.99;fill:#34be5b;fill-opacity:1;stroke:#999999;stroke-width:2.029;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" style="opacity:1;fill:#34be5b;fill-opacity:1;stroke:#b3b3b3;stroke-width:4.029;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 18.578396,19.916354 C 98.746009,59.934602 98.746009,59.934602 98.746009,59.934602 L 18.578396,100.08397 Z" d="M 18.578396,19.916354 C 98.746009,59.934602 98.746009,59.934602 98.746009,59.934602 L 18.578396,100.08397 Z"
id="path1416" id="path1416"
inkscape:export-filename="/home/napcok/GitLab/mbxutils/share/icons/hicolor/48x48/apps/mbx-rpanel.png" inkscape:export-filename="/home/napcok/GitLab/mbxutils/share/icons/hicolor/48x48/apps/mbx-rpanel.png"

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB