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 # 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 rm -f ~/.config/jgmenu/append.csv
if [[ $apps_in == "submenu" ]] if [[ $apps_in == "submenu" ]]
then then
#export XDG_CONFIG_HOME="$CNF_DIR/submenu/"
cat <<EOF > "$HOME"/.config/jgmenu/prepend.csv 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,🔍 @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> @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 Applications,^checkout(apps),applications-other
. ~/.config/mbxutils/inc/m_after_apps.csv
^sep() ^sep()
Logout dialog,mb-jgtools mblogout,system-shutdown . ~/.config/mbxutils/inc/menu_bottom.csv
Preferences,^pipe(mbx-preferences appsmenu),settings
Preferences,mbx-preferences appsmenu st,settings
^sep()
About <b>mbxutils</b>,mbx
^tag(apps) ^tag(apps)
EOF EOF
else else
cat <<EOF > "$HOME"/.config/jgmenu/prepend.csv 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,🔍 @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> @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) ^sep(Applications)
EOF EOF
cat <<EOF > "$HOME"/.config/jgmenu/append.csv cat <<EOF > "$HOME"/.config/jgmenu/append.csv
. ~/.config/mbxutils/inc/m_after_apps.csv
^sep() ^sep()
Logout dialog,mb-jgtools mblogout,system-shutdown . ~/.config/mbxutils/inc/menu_bottom.csv
Preferences,^pipe(mbx-preferences appsmenu),settings
Preferences,mbx-preferences appsmenu st,settings
^sep()
About <b>mbxutils</b>,mbx
EOF EOF
fi fi
configure 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 @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},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> @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>) ^sep(<b>File browser</b>)
$HOME,^pipe(mbxfiles ~) $HOME,^pipe(mbxdir ~)
~/.config,^pipe(mbxfiles ~/.config) ~/.config,^pipe(mbxdir ~/.config)
/etc,^pipe(mbxfiles /etc) /etc,^pipe(mbxdir /etc)
^sep(<b>mbxutils</b>) ^sep(<b>mbxutils</b>)
Preferences,^pipe(mbx-preferences lpanel) Preferences,^pipe(mbx-preferences lpanel)
Preferences,mbx-preferences lpanel st Preferences,mbx-preferences lpanel st
. ~/.config/mbxutils/inc/lbottom.csv . ~/.config/mbxutils/inc/left_bottom.csv
EOF EOF
jgmenu --config-file="${CONFIG_FILE}" --csv-file="${MENU_ITEMS}" 2>/dev/null 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 @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},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> @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) ^sep(Right Panel)
Preferences,^pipe(mbx-preferences rpanel) Preferences,^pipe(mbx-preferences rpanel)
Preferences,mbx-preferences rpanel st Preferences,mbx-preferences rpanel st
. ~/.config/mbxutils/inc/rbottom.csv . ~/.config/mbxutils/inc/right_bottom.csv
EOF EOF
jgmenu --config-file="${CONFIG_FILE}" --csv-file="${MENU_ITEMS}" 2>/dev/null jgmenu --config-file="${CONFIG_FILE}" --csv-file="${MENU_ITEMS}" 2>/dev/null
} }

View File

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

View File

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

View File

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