master
Daniel Napora 2022-02-01 21:20:11 +01:00
parent 768fa03b43
commit e0feacf2a4
12 changed files with 41 additions and 38 deletions

View File

@ -1,3 +1,11 @@
# mbxutils
Mabox X11 utils - a distro DE/WM independent tools for X11
Mabox X11 utils - a set of lightweight and handy utulities for your X11 window manager
Based on jgmenu.
a distro DE/WM independent tools for X11

36
bin/mbx
View File

@ -128,37 +128,29 @@ appsmenu() {
rm -f ~/.config/jgmenu/append.csv
if [[ $apps_in == "submenu" ]]
then
#export XDG_CONFIG_HOME="$CNF_DIR/submenu/"
cat <<EOF > "$HOME"/.config/jgmenu/prepend.csv
@text,,$((menu_padding+10)),$((menu_padding_top-font_size*item_height_factor/100+2)),150,$((font_size*item_height_factor/100)),0,left,top,auto,#000000,🔍
@search,,$((menu_padding+32)),$((menu_padding_top-font_size*item_height_factor/100)),150,$((font_size*item_height_factor/100)),2,left,top,auto,#000000,<i> type to search </i>
. ~/.config/mbxutils/inc/favorites.csv
. ~/.config/mbxutils/inc/menu_top.csv
Applications,^checkout(apps),applications-other
. ~/.config/mbxutils/inc/m_after_apps.csv
^sep()
Logout dialog,mb-jgtools mblogout,system-shutdown
Preferences,^pipe(mbx-preferences appsmenu),settings
Preferences,mbx-preferences appsmenu st,settings
^sep()
About <b>mbxutils</b>,mbx
. ~/.config/mbxutils/inc/menu_bottom.csv
^tag(apps)
EOF
else
cat <<EOF > "$HOME"/.config/jgmenu/prepend.csv
@text,,$((menu_padding+10)),$((menu_padding_top-font_size*item_height_factor/100+2)),150,$((font_size*item_height_factor/100)),0,left,top,auto,#000000,🔍
@search,,$((menu_padding+32)),$((menu_padding_top-font_size*item_height_factor/100)),150,$((font_size*item_height_factor/100)),2,left,top,auto,#000000,<i> type to search </i>
. ~/.config/mbxutils/inc/favorites.csv
. ~/.config/mbxutils/inc/menu_top.csv
^sep(Applications)
EOF
cat <<EOF > "$HOME"/.config/jgmenu/append.csv
. ~/.config/mbxutils/inc/m_after_apps.csv
^sep()
Logout dialog,mb-jgtools mblogout,system-shutdown
Preferences,^pipe(mbx-preferences appsmenu),settings
Preferences,mbx-preferences appsmenu st,settings
^sep()
About <b>mbxutils</b>,mbx
. ~/.config/mbxutils/inc/menu_bottom.csv
EOF
fi
configure
@ -195,16 +187,16 @@ cat <<EOF > "${MENU_ITEMS}"
@icon,,$((menu_padding+item_margin_x)),${menu_padding},48,48,0,left,top,,,/usr/share/mbxutils/logos/distributor-logo-${logo}.svg
@text,,$((menu_padding+item_margin_x+50)),${menu_padding},180,32,0,left,top,${fgcolor},#DDDDDD,$distro ${OSVERSION} <sup><i>${OSCODE}</i></sup>
@text,,$((menu_padding+item_margin_x+50)),$((menu_padding+20)),180,32,0,left,top,${fgcolor},#DDDDDD,<i>${XDG_SESSION_DESKTOP^}</i>
. ~/.config/mbxutils/inc/ltop.csv
. ~/.config/mbxutils/inc/left_top.csv
^sep(<b>File browser</b>)
$HOME,^pipe(mbxfiles ~)
~/.config,^pipe(mbxfiles ~/.config)
/etc,^pipe(mbxfiles /etc)
$HOME,^pipe(mbxdir ~)
~/.config,^pipe(mbxdir ~/.config)
/etc,^pipe(mbxdir /etc)
^sep(<b>mbxutils</b>)
Preferences,^pipe(mbx-preferences lpanel)
Preferences,mbx-preferences lpanel st
. ~/.config/mbxutils/inc/lbottom.csv
. ~/.config/mbxutils/inc/left_bottom.csv
EOF
jgmenu --config-file="${CONFIG_FILE}" --csv-file="${MENU_ITEMS}" 2>/dev/null
}
@ -227,11 +219,11 @@ cat <<EOF > "${MENU_ITEMS}"
@icon,,$((menu_padding+item_margin_x)),${menu_padding},48,48,0,left,top,,,/usr/share/mbxutils/logos/distributor-logo-${logo}.svg
@text,,$((menu_padding+item_margin_x+50)),${menu_padding},180,32,0,left,top,${fgcolor},#DDDDDD,$distro ${OSVERSION} <sup><i>${OSCODE}</i></sup>
@text,,$((menu_padding+item_margin_x+50)),$((menu_padding+20)),180,32,0,left,top,${fgcolor},#DDDDDD,<i>${XDG_SESSION_DESKTOP^}</i>
. ~/.config/mbxutils/inc/rtop.csv
. ~/.config/mbxutils/inc/right_top.csv
^sep(Right Panel)
Preferences,^pipe(mbx-preferences rpanel)
Preferences,mbx-preferences rpanel st
. ~/.config/mbxutils/inc/rbottom.csv
. ~/.config/mbxutils/inc/right_bottom.csv
EOF
jgmenu --config-file="${CONFIG_FILE}" --csv-file="${MENU_ITEMS}" 2>/dev/null
}

View File

@ -122,18 +122,18 @@ main() {
out+=("^sep(Apps Menu)")
out+=("<tt>$(printf "%-15s %24s" "Show Apps in:" "[<b>$apps_in</b>]")</tt>,^checkout(appsin)")
out+=("^sep(<i>Custom commands in Apps Menu</i>)")
out+=("Favorites,xdg-open ~/.config/mbxutils/inc/favorites.csv")
out+=("Commands below Apps,xdg-open ~/.config/mbxutils/inc/m_after_apps.csv")
out+=("Favorites,xdg-open ~/.config/mbxutils/inc/menu_top.csv")
out+=("Commands below Apps,xdg-open ~/.config/mbxutils/inc/menu_bottom.csv")
;;
lpanel)
out+=("^sep(<i>Custom commands in Left Sidepanel</i>)")
out+=("Top,xdg-open ~/.config/mbxutils/inc/ltop.csv")
out+=("Bottom,xdg-open ~/.config/mbxutils/inc/lbottom.csv")
out+=("Top,xdg-open ~/.config/mbxutils/inc/left_top.csv")
out+=("Bottom,xdg-open ~/.config/mbxutils/inc/left_bottom.csv")
;;
rpanel)
out+=("^sep(<i>Custom commands in Right Sidepanel</i>)")
out+=("Top,xdg-open ~/.config/mbxutils/inc/rtop.csv")
out+=("Bottom,xdg-open ~/.config/mbxutils/inc/rbottom.csv")
out+=("Top,xdg-open ~/.config/mbxutils/inc/right_top.csv")
out+=("Bottom,xdg-open ~/.config/mbxutils/inc/right_bottom.csv")
;;
all)
out+=("^sep(<i>Custom commands ALL</i>)")
@ -145,7 +145,7 @@ main() {
out+=("<tt>$(printf "%-15s %24s" "Font:" "[<b>$font</b>]")</tt>,^pipe($ME fonts $1)")
out+=("<tt>$(printf "%-15s %24s" "Font size (px):" "[<b>$font_size</b>]")</tt>,^checkout(fontsize)")
out+=("<tt>$(printf "%-15s %24s" "Line height:" "[<b>$item_height_factor%</b>]")</tt>,^checkout(lineheight)")
out+=("<tt>$(printf "%-15s %24s" "Menu BGcolor:" "[<b>$bgcolor</b>]")</tt>,^checkout(bgcolor)")
out+=("<tt>$(printf "%-15s %24s" "Menu BGcolor:" "[<b>$color_menu_bg</b>]")</tt>,^checkout(bgcolor)")
out+=("<tt>$(printf "%-15s %24s" "Menu Padding:" "[<b>$menu_padding</b>]")</tt>,^checkout(menupadding)")
out+=("^sep()")
out+=("Reset to default,mbx reset ${1}")
@ -159,7 +159,7 @@ main() {
out+=("Edit config file,xdg-open $CNF_FILE")
out+=("Open config dir,xdg-open $CNF_DIR")
out+=("^sep()")
out+=("About mbxutils,mbx")
out+=("About <b>mbxutils</b>,mbx")
#tags

View File

@ -5,8 +5,8 @@ Name=MBX Main Menu
Comment=Main menu (mbxutils)
Keywords=
StartupNotify=false
Icon=mbx-mmenu
Icon=mbx-appsmenu
TryExec=mbx
Exec=mbx mmenu
Exec=mbx appsmenu
Categories=Utility;
#NoDisplay=true

View File

@ -1,7 +1,7 @@
^sep(Custom Commands)
btop,^term(btop)
Random BGcolor,mbx setvar color_menu_bg=$(shuf -n 1 ~/.config/mbxutils/inc/colors.clr);mbx lpanel
^sep()
Edit commands,xdg-open ~/.config/mbxutils/inc/lbottom.csv
^sep()
About <b>mbxutils</b>,mbx about
#^sep()
#Edit commands,xdg-open ~/.config/mbxutils/inc/lbottom.csv
#^sep()
#About <b>mbxutils</b>,mbx about
1 ^sep(Custom Commands)
2 btop,^term(btop)
3 Random BGcolor,mbx setvar color_menu_bg=$(shuf -n 1 ~/.config/mbxutils/inc/colors.clr);mbx lpanel
4 ^sep() #^sep()
5 Edit commands,xdg-open ~/.config/mbxutils/inc/lbottom.csv #Edit commands,xdg-open ~/.config/mbxutils/inc/lbottom.csv
6 ^sep() #^sep()
7 About <b>mbxutils</b>,mbx about #About <b>mbxutils</b>,mbx about

View File

@ -1 +0,0 @@

View File

@ -0,0 +1,4 @@
Logout dialog,mb-jgtools mblogout,system-shutdown
Preferences,^pipe(mbx-preferences appsmenu),settings
#Preferences,mbx-preferences appsmenu st,settings
1 Logout dialog mb-jgtools mblogout system-shutdown
2 Preferences ^pipe(mbx-preferences appsmenu) settings
3 #Preferences mbx-preferences appsmenu st settings