|
|
|
@ -4,38 +4,15 @@ |
|
|
|
|
# Copyright (C) 2019-2021 Daniel Napora <napcok@gmail.com> |
|
|
|
|
|
|
|
|
|
. $HOME/.config/mabox/mabox.conf |
|
|
|
|
unset font |
|
|
|
|
unset menu_gradient_pos |
|
|
|
|
jgmenu_theme=${jgmenu_theme:-obtheme} |
|
|
|
|
|
|
|
|
|
case $jgmenu_theme in |
|
|
|
|
default) |
|
|
|
|
#export color_norm_fg="#FFFFFF " |
|
|
|
|
;; |
|
|
|
|
obtheme) |
|
|
|
|
#export color_title_fg="#FFFFFF " |
|
|
|
|
ob_file=$HOME/.config/openbox/rc.xml |
|
|
|
|
[[ -f $ob_file ]] && wm_theme=$(awk '/<theme>/ {while (getline n) {if (match(n, /<name>/)){l=n; exit}}} END {split(l, a, "[<>]"); print a[3]}' "$ob_file") |
|
|
|
|
if [ ! -f "$HOME/.config/mabox/jgobthemes/${wm_theme// /_}.colorrc" ]; then |
|
|
|
|
obtheme2jgmenu |
|
|
|
|
fi |
|
|
|
|
while read -r a b c |
|
|
|
|
do |
|
|
|
|
[[ -n "$a" && "$a" != [[:blank:]#]* ]] && export "$a$b$c" |
|
|
|
|
done < "$HOME/.config/mabox/jgobthemes/${wm_theme// /_}.colorrc" |
|
|
|
|
;; |
|
|
|
|
*) |
|
|
|
|
export color_title_fg="#FFFFFF " |
|
|
|
|
while read -r a b c |
|
|
|
|
do |
|
|
|
|
[[ -n "$a" && "$a" != [[:blank:]#]* ]] && export "$a$b$c" |
|
|
|
|
done < $HOME/.config/mabox/jgobthemes/$jgmenu_theme.colorrc |
|
|
|
|
;; |
|
|
|
|
esac |
|
|
|
|
|
|
|
|
|
menu_font_size=${menu_font_size:-9} |
|
|
|
|
menu_font_family=${menu_font_family:-Noto Sans Medium} |
|
|
|
|
jgmenu_font="${menu_font_family} ${menu_font_size}" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[ $(pidof picom) ] && MENU_RADIUS=$jgtools_radius |
|
|
|
|
[ -z $jgmenu_use_borders ] && menu_border=0 |
|
|
|
|
|
|
|
|
@ -122,7 +99,7 @@ color_title_border = ${color_title_border:-#169f6f 100} |
|
|
|
|
color_title_bg = ${color_title_bg:-#169f6f 100} |
|
|
|
|
color_scroll_ind = ${color_scroll_ind:-#504e65 100} |
|
|
|
|
|
|
|
|
|
sep_markup = weight="bold" foreground="${color_title_fg% *}" |
|
|
|
|
sep_markup = weight="bold" |
|
|
|
|
sep_halign = ${sep_halign:-center} |
|
|
|
|
sep_height = ${sep_height:-5} |
|
|
|
|
font = ${jgmenu_font:-Noto Sans Medium 9} |
|
|
|
@ -130,8 +107,22 @@ icon_size = ${jgmenu_icon_size:-18} |
|
|
|
|
icon_theme = ${jgmenu_icon_theme:-Numix-Square} |
|
|
|
|
EOF |
|
|
|
|
|
|
|
|
|
unset font |
|
|
|
|
unset menu_gradient_pos |
|
|
|
|
case $jgmenu_theme in |
|
|
|
|
default) |
|
|
|
|
;; |
|
|
|
|
obtheme) |
|
|
|
|
ob_file=$HOME/.config/openbox/rc.xml |
|
|
|
|
[[ -f $ob_file ]] && wm_theme=$(awk '/<theme>/ {while (getline n) {if (match(n, /<name>/)){l=n; exit}}} END {split(l, a, "[<>]"); print a[3]}' "$ob_file") |
|
|
|
|
if [ ! -f "$HOME/.config/mabox/jgobthemes/${wm_theme// /_}.colorrc" ]; then |
|
|
|
|
obtheme2jgmenu |
|
|
|
|
fi |
|
|
|
|
cat "$HOME/.config/mabox/jgobthemes/${wm_theme// /_}.colorrc" >> $CONFIG_FILE |
|
|
|
|
;; |
|
|
|
|
*) |
|
|
|
|
cat "$HOME/.config/mabox/jgobthemes/${jgmenu_theme}.colorrc" >> $CONFIG_FILE |
|
|
|
|
;; |
|
|
|
|
esac |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#MENU GŁÓWNE |
|
|
|
@ -436,10 +427,8 @@ mkconfigfile |
|
|
|
|
|
|
|
|
|
cat <<EOF > ${MENU_ITEMS} |
|
|
|
|
@icon,,$((jgtools_padding + 10)),$((jgtools_padding + 10)),48,48,4,left,top,,,/usr/share/icons/hicolor/48x48/apps/distributor-logo-mabox.png |
|
|
|
|
#@text,,$(expr $jgtools_padding + 65),$(expr $jgtools_padding + 10),200,20,4,left,top,${color_sel_fg% *},#111111,<big>$OSNAME $OSVERSION</big> <sup><i>$OSCODE</i></sup> |
|
|
|
|
@text,,$((jgtools_padding + 65)),$((jgtools_padding + 10)),200,20,4,left,top,auto,#111111,<big>$OSNAME $OSVERSION</big> <sup><i>$OSCODE</i></sup> |
|
|
|
|
@text,,$((jgtools_padding + 65)),$((jgtools_padding + 30)),200,20,4,left,top,auto,#444444,<small>$USER@$HOSTNAME</small> |
|
|
|
|
#@icon,,5,$(expr $MENU_HEIGHT_MIN - 180),240,180,4,center,top,,,$BOTTOM_IMG |
|
|
|
|
@search,,$((gtools_padding + 80)),$((jgtools_padding + 50)),292,20,4,left,top,auto,#262626,"""<big></big> <small><i>$TYPE_TO_SEARCH</i></small>""" |
|
|
|
|
|
|
|
|
|
. $HOME/.config/mabox/right-prepend.csv |
|
|
|
@ -680,14 +669,13 @@ fi |
|
|
|
|
[[ $places_jglockscreen == true || -z ${places_jglockscreen} ]] && jglockscreen="<big></big> $LOCKSCREEN,^pipe(jglockscreen -r)" && pipesep="^sep($PIPEMENUS)" |
|
|
|
|
|
|
|
|
|
# VBOXES |
|
|
|
|
[[ $places_vboxes == true ]] && vboxes=". $HOME/.config/mabox/vboxes.csv" || vboxes="" |
|
|
|
|
#[[ $places_vboxes == true ]] && vboxes=". $HOME/.config/mabox/vboxes.csv" || vboxes="" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mkconfigfile |
|
|
|
|
|
|
|
|
|
cat <<EOF > ${MENU_ITEMS} |
|
|
|
|
@icon,,$((jgtools_padding + 10)),$((jgtools_padding + 10)),48,48,4,left,top,,,/usr/share/icons/hicolor/48x48/apps/mbcc.png |
|
|
|
|
#@icon,,10,$((MENU_HEIGHT_MIN - 160)),240,180,4,center,top,,,$BOTTOM_IMG |
|
|
|
|
@text,,$((jgtools_padding + 70)),$((jgtools_padding + 10)),200,20,4,left,top,auto,#111111,<big>$OSNAME $OSVERSION</big> <sup><i>$OSCODE</i></sup> |
|
|
|
|
@text,,$((jgtools_padding + 70)),$((jgtools_padding + 30)),200,20,4,left,top,auto,#444444,<small>$USER@$HOSTNAME</small> |
|
|
|
|
|
|
|
|
@ -710,7 +698,7 @@ $softwarepipe |
|
|
|
|
$tint2pipe |
|
|
|
|
$conkypipe |
|
|
|
|
|
|
|
|
|
${vboxes} |
|
|
|
|
#${vboxes} |
|
|
|
|
. $HOME/.config/mabox/places-append.csv |
|
|
|
|
EOF |
|
|
|
|
|
|
|
|
|