upd
This commit is contained in:
parent
ba9cd67d25
commit
6065ffb611
27
bin/mbx
27
bin/mbx
@ -88,6 +88,7 @@ stay_alive = 0
|
||||
terminal_exec = ${terminal:-terminator}
|
||||
terminal_args = -e
|
||||
hover_delay = 80
|
||||
columns = ${columns:-1}
|
||||
# MENU
|
||||
menu_halign = ${menu_halign:-left}
|
||||
menu_valign = ${menu_valign:-center}
|
||||
@ -244,19 +245,31 @@ about() {
|
||||
theight=$((HEIGHT/4))
|
||||
|
||||
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_padding=8
|
||||
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
|
||||
cat <<EOF > ${MENU_ITEMS}
|
||||
@icon,,${menu_padding},${menu_padding},${twidth},${theight},4,left,top,,,$THUMB
|
||||
^sep(About mbxutils)
|
||||
Visit website,xdg-open https://maboxlinux.org
|
||||
|
||||
|
||||
@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>
|
||||
@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
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
do
|
||||
if ( dlm=$'\x1F' ; IFS="$dlm" ; [[ "$dlm${search_fonts[*]}$dlm" == *"$dlm${x}$dlm"* ]] ) ; then
|
||||
@ -18,6 +18,7 @@ check_fonts() {
|
||||
fi
|
||||
done < <(fc-list| cut -d: -f2|cut -d, -f1,2 |tr , '\n'|sort|uniq)
|
||||
printf '%s\n' "${fonts[@]}" > "$CNF_DIR"/inc/fonts.inc
|
||||
mbx setvar "font=\'${fonts[0]}\'"
|
||||
}
|
||||
|
||||
check_terminals() {
|
||||
@ -33,7 +34,7 @@ check_terminals() {
|
||||
}
|
||||
|
||||
check_browsers() {
|
||||
search_browsers=(firefox chromium vivaldi opera midori)
|
||||
search_browsers=(firefox chromium vivaldi opera brave midori qutebrowser falkon)
|
||||
for i in "${search_browsers[@]}"
|
||||
do
|
||||
if hash ${i} 2>/dev/null; then
|
||||
@ -41,6 +42,7 @@ check_browsers() {
|
||||
fi
|
||||
done
|
||||
printf '%s\n' "${browsers[@]}" > "$CNF_DIR"/inc/browsers.inc
|
||||
mbx setvar wwwbrowser=${browsers[0]}
|
||||
}
|
||||
|
||||
check_file_managers() {
|
||||
|
11
share/applications/mbxutils.desktop
Normal file
11
share/applications/mbxutils.desktop
Normal file
@ -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)
|
||||
Terminal,exo-open --launch TerminalEmulator,utilities-terminal
|
||||
Przeglądarka WWW,exo-open --launch WebBrowser,firefox
|
||||
Menedżer plików,exo-open --launch FileManager,system-file-manager
|
||||
Dodaj/Usuń programy,pamac-manager,pamac
|
||||
^sep(Favorites)
|
||||
Terminal,^term(/bin/bash),utilities-terminal
|
||||
Web Browser,xdg-open about:start,firefox
|
||||
Files,xdg-open ~,system-file-manager
|
||||
Software,pamac-manager,pamac
|
||||
^sep()
|
||||
~/.config,^pipe(mbxfiles ~/.config),folder
|
||||
^sep()
|
||||
|
|
Loading…
Reference in New Issue
Block a user