upd
parent
ba9cd67d25
commit
6065ffb611
27
bin/mbx
27
bin/mbx
|
@ -88,6 +88,7 @@ stay_alive = 0
|
||||||
terminal_exec = ${terminal:-terminator}
|
terminal_exec = ${terminal:-terminator}
|
||||||
terminal_args = -e
|
terminal_args = -e
|
||||||
hover_delay = 80
|
hover_delay = 80
|
||||||
|
columns = ${columns:-1}
|
||||||
# MENU
|
# MENU
|
||||||
menu_halign = ${menu_halign:-left}
|
menu_halign = ${menu_halign:-left}
|
||||||
menu_valign = ${menu_valign:-center}
|
menu_valign = ${menu_valign:-center}
|
||||||
|
@ -244,19 +245,31 @@ about() {
|
||||||
theight=$((HEIGHT/4))
|
theight=$((HEIGHT/4))
|
||||||
|
|
||||||
THUMB="$(DISPLAY=:0 scrot -t ${twidth}x${theight} -o $HOME/.config/mbxutils/mbx.png -e 'echo $m')"
|
THUMB="$(DISPLAY=:0 scrot -t ${twidth}x${theight} -o $HOME/.config/mbxutils/mbx.png -e 'echo $m')"
|
||||||
|
# TODO better menu height calculation
|
||||||
|
columns=2
|
||||||
|
icon_size=$((font_size*item_height_factor/100-2))
|
||||||
menu_halign=center
|
menu_halign=center
|
||||||
menu_padding=8
|
menu_padding=8
|
||||||
menu_width=$((twidth+menu_padding*2))
|
menu_width=$((twidth+menu_padding*2))
|
||||||
menu_padding_top=$((theight+menu_padding*2))
|
item_height=$((font_size*item_height_factor/100))
|
||||||
|
menu_padding_top=$((theight+menu_padding*2+40))
|
||||||
|
menu_height_max=$((menu_padding_top+menu_padding+item_height*7+sep_height*6))
|
||||||
|
menu_height_min=$((menu_padding_top+menu_padding+item_height*7+sep_height*6))
|
||||||
configure
|
configure
|
||||||
cat <<EOF > ${MENU_ITEMS}
|
cat <<EOF > ${MENU_ITEMS}
|
||||||
@icon,,${menu_padding},${menu_padding},${twidth},${theight},4,left,top,,,$THUMB
|
@icon,,${menu_padding},${menu_padding},${twidth},${theight},4,left,top,,,$THUMB
|
||||||
^sep(About mbxutils)
|
@text,,$((menu_padding+20)),$((menu_padding+theight)),${twidth},25,4,left,top,${fgcolor},#DDDDDD,<span font="20px"><b>mbxutils</b></span><span font="12px"> 0.2.0 (technical preview)</span>
|
||||||
Visit website,xdg-open https://maboxlinux.org
|
@text,,$((menu_padding+40)),$((menu_padding+theight+20)),${twidth},25,4,left,top,${fgcolor} 60,${fgcolor} 12,<span font="12px"><i>a set of lightweight and handy utilities for your X11 window manager</i></span>
|
||||||
|
#^sep(mbxutils <span font-weight="normal"><sub><i>handy utils for your X11 window manager</i></sub></span>)
|
||||||
|
^sep(Utilities)
|
||||||
|
Main menu,mbx mmenu,menu
|
||||||
|
Left SidePanel,mbx lpanel,arrow-left
|
||||||
|
Right SidePanel,mbx rpanel,arrow-right
|
||||||
|
Quick Filebrowser,mbx files,folder
|
||||||
|
Preferences,^pipe(mbx preferences mmenu),firefox
|
||||||
|
^sep(Manual)
|
||||||
|
Configure keybindings,xdg-open https://mbxutils.maboxlinux.org,firefox
|
||||||
|
Roadmap
|
||||||
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
|
||||||
|
|
|
@ -10,7 +10,7 @@ CNF_FILE="$CNF_DIR/mbx.conf"
|
||||||
mkdir -p "$CNF_DIR"/inc
|
mkdir -p "$CNF_DIR"/inc
|
||||||
|
|
||||||
check_fonts() {
|
check_fonts() {
|
||||||
search_fonts=(Ubuntu "DejaVu Serif" "Autour One" "Noto Sans" "Noto Sans Light" "JetBrains Mono" "Droid Sans" Roboto Helvetica Cantarell)
|
search_fonts=(Ubuntu "Noto Sans" "Noto Sans Light" "DejaVu Serif" "Autour One" "JetBrains Mono" "Droid Sans" Roboto Helvetica Cantarell)
|
||||||
while read -r x
|
while read -r x
|
||||||
do
|
do
|
||||||
if ( dlm=$'\x1F' ; IFS="$dlm" ; [[ "$dlm${search_fonts[*]}$dlm" == *"$dlm${x}$dlm"* ]] ) ; then
|
if ( dlm=$'\x1F' ; IFS="$dlm" ; [[ "$dlm${search_fonts[*]}$dlm" == *"$dlm${x}$dlm"* ]] ) ; then
|
||||||
|
@ -18,6 +18,7 @@ check_fonts() {
|
||||||
fi
|
fi
|
||||||
done < <(fc-list| cut -d: -f2|cut -d, -f1,2 |tr , '\n'|sort|uniq)
|
done < <(fc-list| cut -d: -f2|cut -d, -f1,2 |tr , '\n'|sort|uniq)
|
||||||
printf '%s\n' "${fonts[@]}" > "$CNF_DIR"/inc/fonts.inc
|
printf '%s\n' "${fonts[@]}" > "$CNF_DIR"/inc/fonts.inc
|
||||||
|
mbx setvar "font=\'${fonts[0]}\'"
|
||||||
}
|
}
|
||||||
|
|
||||||
check_terminals() {
|
check_terminals() {
|
||||||
|
@ -33,7 +34,7 @@ check_terminals() {
|
||||||
}
|
}
|
||||||
|
|
||||||
check_browsers() {
|
check_browsers() {
|
||||||
search_browsers=(firefox chromium vivaldi opera midori)
|
search_browsers=(firefox chromium vivaldi opera brave midori qutebrowser falkon)
|
||||||
for i in "${search_browsers[@]}"
|
for i in "${search_browsers[@]}"
|
||||||
do
|
do
|
||||||
if hash ${i} 2>/dev/null; then
|
if hash ${i} 2>/dev/null; then
|
||||||
|
@ -41,6 +42,7 @@ check_browsers() {
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
printf '%s\n' "${browsers[@]}" > "$CNF_DIR"/inc/browsers.inc
|
printf '%s\n' "${browsers[@]}" > "$CNF_DIR"/inc/browsers.inc
|
||||||
|
mbx setvar wwwbrowser=${browsers[0]}
|
||||||
}
|
}
|
||||||
|
|
||||||
check_file_managers() {
|
check_file_managers() {
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
[Desktop Entry]
|
||||||
|
Version=1.0
|
||||||
|
Type=Application
|
||||||
|
Name=MBX Utils
|
||||||
|
Comment=Enhance your X11 window manager
|
||||||
|
Keywords=
|
||||||
|
Icon=mbxcolors
|
||||||
|
TryExec=mbx
|
||||||
|
Exec=mbx
|
||||||
|
Categories=Utilities;
|
||||||
|
#NoDisplay=true
|
|
@ -1,8 +1,8 @@
|
||||||
^sep(Ulubione)
|
^sep(Favorites)
|
||||||
Terminal,exo-open --launch TerminalEmulator,utilities-terminal
|
Terminal,^term(/bin/bash),utilities-terminal
|
||||||
Przeglądarka WWW,exo-open --launch WebBrowser,firefox
|
Web Browser,xdg-open about:start,firefox
|
||||||
Menedżer plików,exo-open --launch FileManager,system-file-manager
|
Files,xdg-open ~,system-file-manager
|
||||||
Dodaj/Usuń programy,pamac-manager,pamac
|
Software,pamac-manager,pamac
|
||||||
^sep()
|
^sep()
|
||||||
~/.config,^pipe(mbxfiles ~/.config),folder
|
~/.config,^pipe(mbxfiles ~/.config),folder
|
||||||
^sep()
|
^sep()
|
||||||
|
|
|
Loading…
Reference in New Issue