about
parent
c6156d5efe
commit
ba9cd67d25
31
bin/mbx
31
bin/mbx
|
@ -6,6 +6,7 @@
|
||||||
# TODO Preferences standalone
|
# TODO Preferences standalone
|
||||||
# TODO Logout Dialog postponed
|
# TODO Logout Dialog postponed
|
||||||
# TODO Filebrowser standalone postponed
|
# TODO Filebrowser standalone postponed
|
||||||
|
# FIXME Remove devel-helpers - move them to another tool
|
||||||
|
|
||||||
|
|
||||||
ME=$(basename "$0")
|
ME=$(basename "$0")
|
||||||
|
@ -127,6 +128,7 @@ color_menu_border = #eeeeee 8
|
||||||
color_title_bg = ${color_title_bg:-"$fgcolor 12"}
|
color_title_bg = ${color_title_bg:-"$fgcolor 12"}
|
||||||
color_title_border = ${color_title_border:-}
|
color_title_border = ${color_title_border:-}
|
||||||
color_sep_fg = ${color_sep_fg:-}
|
color_sep_fg = ${color_sep_fg:-}
|
||||||
|
icon_theme = ${icon_theme:-}
|
||||||
icon_size = ${icon_size:-0}
|
icon_size = ${icon_size:-0}
|
||||||
icon_norm_alpha = 70
|
icon_norm_alpha = 70
|
||||||
icon_sel_alpha = 100
|
icon_sel_alpha = 100
|
||||||
|
@ -184,6 +186,9 @@ cat <<EOF > $HOME/.config/jgmenu/append.csv
|
||||||
. ~/.config/mbxutils/inc/m_after_apps.csv
|
. ~/.config/mbxutils/inc/m_after_apps.csv
|
||||||
^sep()
|
^sep()
|
||||||
Preferences,^pipe($ME preferences mmenu),firefox
|
Preferences,^pipe($ME preferences mmenu),firefox
|
||||||
|
^sep()
|
||||||
|
About <b>mbxutils</b>,mbx
|
||||||
|
^sep()
|
||||||
Logout dialog,mb-jgtools mblogout,system-shutdown
|
Logout dialog,mb-jgtools mblogout,system-shutdown
|
||||||
^sep(rgb: $rgb)
|
^sep(rgb: $rgb)
|
||||||
^sep(rel: $rel)
|
^sep(rel: $rel)
|
||||||
|
@ -230,6 +235,32 @@ Right Panel,,terminal
|
||||||
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
|
||||||
}
|
}
|
||||||
|
about() {
|
||||||
|
CONFIG_FILE=$(mktemp)
|
||||||
|
MENU_ITEMS=$(mktemp)
|
||||||
|
trap "rm -f ${CONFIG_FILE} ${MENU_ITEMS}" EXIT
|
||||||
|
eval $(xdotool getdisplaygeometry --shell)
|
||||||
|
twidth=$((WIDTH/4))
|
||||||
|
theight=$((HEIGHT/4))
|
||||||
|
|
||||||
|
THUMB="$(DISPLAY=:0 scrot -t ${twidth}x${theight} -o $HOME/.config/mbxutils/mbx.png -e 'echo $m')"
|
||||||
|
|
||||||
|
|
||||||
|
menu_halign=center
|
||||||
|
menu_padding=8
|
||||||
|
menu_width=$((twidth+menu_padding*2))
|
||||||
|
menu_padding_top=$((theight+menu_padding*2))
|
||||||
|
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
|
||||||
|
|
||||||
|
|
||||||
|
EOF
|
||||||
|
|
||||||
|
jgmenu --config-file=${CONFIG_FILE} --csv-file=${MENU_ITEMS} 2>/dev/null
|
||||||
|
}
|
||||||
|
|
||||||
setvar() {
|
setvar() {
|
||||||
search="$(echo $1|cut -d= -f1)="
|
search="$(echo $1|cut -d= -f1)="
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# mbxinit - initialize/update config files needed by mbxutils
|
# mbxinit - initialize/update config files needed by mbxutils
|
||||||
|
# TODO check for GUI package managers
|
||||||
|
# TODO generate favorites here
|
||||||
|
|
||||||
CNF_DIR="$HOME/.config/mbxutils"
|
CNF_DIR="$HOME/.config/mbxutils"
|
||||||
CNF_FILE="$CNF_DIR/mbx.conf"
|
CNF_FILE="$CNF_DIR/mbx.conf"
|
||||||
|
@ -19,7 +21,7 @@ check_fonts() {
|
||||||
}
|
}
|
||||||
|
|
||||||
check_terminals() {
|
check_terminals() {
|
||||||
search_terminals=(terminator lxterminal xfce4-terminal alacritty konsole qterminal )
|
search_terminals=(terminator lxterminal xfce4-terminal alacritty gnome-terminal konsole qterminal )
|
||||||
for i in "${search_terminals[@]}"
|
for i in "${search_terminals[@]}"
|
||||||
do
|
do
|
||||||
if hash ${i} 2>/dev/null; then
|
if hash ${i} 2>/dev/null; then
|
||||||
|
@ -27,6 +29,7 @@ check_terminals() {
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
printf '%s\n' "${terminals[@]}" > "$CNF_DIR"/inc/terminals.inc
|
printf '%s\n' "${terminals[@]}" > "$CNF_DIR"/inc/terminals.inc
|
||||||
|
mbx setvar terminal=${terminals[0]}
|
||||||
}
|
}
|
||||||
|
|
||||||
check_browsers() {
|
check_browsers() {
|
||||||
|
@ -41,7 +44,7 @@ check_browsers() {
|
||||||
}
|
}
|
||||||
|
|
||||||
check_file_managers() {
|
check_file_managers() {
|
||||||
search_file_managers=(xdg-open pcmanfm thunar caja nautilus dolphin)
|
search_file_managers=(xdg-open pcmanfm thunar pcmanfm-qt caja nautilus dolphin)
|
||||||
for i in "${search_file_managers[@]}"
|
for i in "${search_file_managers[@]}"
|
||||||
do
|
do
|
||||||
if hash ${i} 2>/dev/null; then
|
if hash ${i} 2>/dev/null; then
|
||||||
|
@ -49,6 +52,7 @@ check_file_managers() {
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
printf '%s\n' "${file_managers[@]}" > "$CNF_DIR"/inc/file_managers.inc
|
printf '%s\n' "${file_managers[@]}" > "$CNF_DIR"/inc/file_managers.inc
|
||||||
|
mbx setvar filemanager=${file_managers[0]}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue