eye-candy

master
Daniel Napora 2022-09-20 21:15:55 +02:00
parent 28191ab7ff
commit e0727037d1
1 changed files with 74 additions and 13 deletions

View File

@ -262,7 +262,8 @@ mb-setvar jgtools_last="\"right\""
CONFIG_FILE=$(mktemp)
MENU_ITEMS=$(mktemp)
trap "rm -f ${CONFIG_FILE} ${MENU_ITEMS}" EXIT
RHEAD=$(mktemp)
trap "rm -f ${CONFIG_FILE} ${MENU_ITEMS} ${RHEAD}" EXIT
[ $jgmenu_use_icons == false ] && jgmenu_icon_size=0
#BOTTOM_IMG=${right_bottom_img:-/usr/share/mb-jgtools/mabox_3D_gold.png}
MENU_HALIGN="right"
@ -337,6 +338,7 @@ case $LANG in
THEME_MNGR="Menadżer schematów"
UGUIDE_TITLE="Przewodnik Użytkownika Mabox"
UGUIDE=". /usr/share/mb-jgtools/userguide_PL.csv"
FINISHED=" Finished! Press ENTER to quit"
;;
es*)
TYPE_TO_SEARCH="Buscar"
@ -384,6 +386,7 @@ case $LANG in
THEME_MNGR="Gestor de Temas"
UGUIDE_TITLE="Mabox User Guide"
UGUIDE=". /usr/share/mb-jgtools/userguide.csv"
FINISHED=" Finished! Press ENTER to quit"
;;
*)
TYPE_TO_SEARCH="type to search"
@ -431,17 +434,49 @@ case $LANG in
THEME_MNGR="Theme Manager"
UGUIDE_TITLE="Mabox User Guide"
UGUIDE=". /usr/share/mb-jgtools/userguide.csv"
FINISHED=" Finished! Press ENTER to quit"
;;
esac
[ $jgmenu_use_icons == false ] && icons=0 iconmargin=0 || icons=1 iconmargin=2
mkconfigfile
cat <<EOF > ${MENU_ITEMS}
if [ $panels_heightpos == "full" ]; then
WALLPALDIR="$HOME/.config/colormenu/palettes/wallp"
mkdir -p "$WALLPALDIR"
read WALLPATH<<< $(grep file "$HOME"/.config/nitrogen/bg-saved.cfg | cut -d'=' -f2)
WALLPAPER=${WALLPATH##*/}
THUMBDIR="$HOME/.config/mabox/wallthumbs"
mkdir -p ${THUMBDIR}
THUMB="${THUMBDIR}/${WALLPAPER}.png"
if [[ ! -f "$THUMB" ]]
then
convert ${WALLPATH} -resize 270x150^ -gravity center -extent 270x150 ${THUMB}
fi
JGWIDTH=$((jgtools_padding + 278 + jgtools_padding))
MENU_PADDING_TOP=$((jgtools_padding + 158))
cat <<EOF > ${RHEAD}
@icon,,$((jgtools_padding)),$((jgtools_padding)),278,158,4,left,top,,,${THUMB}
@icon,,$((jgtools_padding + 2)),$((jgtools_padding + 2)),48,48,4,left,top,,,/usr/share/icons/hicolor/48x48/apps/distributor-logo-mabox.png
@rect,,$((jgtools_padding + 52)),$((jgtools_padding + 2)),200,76,2,left,top,#222222 50,#222222 80,
@text,,$((jgtools_padding + 58)),$((jgtools_padding + 4)),200,20,4,left,top,#EEEEEE,#EEEEEE,<big>$OSNAME $OSVERSION</big> <sup><i>$OSCODE</i></sup>
@text,,$((jgtools_padding + 58)),$((jgtools_padding + 24)),200,20,4,left,top,#EEEEEE,#EEEEEE,<small>$USER@$HOSTNAME</small>
@rect,,$((jgtools_padding + 72)),$((jgtools_padding + 130)),160,22,2,left,top,#222222 50,#222222 80,
@search,,$((jgtools_padding + 80)),$((jgtools_padding + 130)),292,20,4,left,top,#EEEEEE,##EEEEEE,"""<big></big> <small><i>$TYPE_TO_SEARCH</i></small>"""
EOF
else
cat <<EOF > ${RHEAD}
@icon,,$((jgtools_padding + 2)),$((jgtools_padding + 10)),48,48,4,left,top,,,/usr/share/icons/hicolor/48x48/apps/distributor-logo-mabox.png
@text,,$((jgtools_padding + 56)),$((jgtools_padding + 10)),200,20,4,left,top,auto,#111111,<big>$OSNAME $OSVERSION</big> <sup><i>$OSCODE</i></sup>
@text,,$((jgtools_padding + 56)),$((jgtools_padding + 30)),200,20,4,left,top,auto,#444444,<small>$USER@$HOSTNAME</small>
@search,,$((gtools_padding + 80)),$((jgtools_padding + 50)),292,20,4,left,top,auto,#262626,"""<big></big> <small><i>$TYPE_TO_SEARCH</i></small>"""
EOF
fi
mkconfigfile
cat <<EOF > ${MENU_ITEMS}
. ${RHEAD}
. $HOME/.config/mabox/right-prepend.csv
@ -453,9 +488,9 @@ $LOOK_AND_FEEL,^root(wyglad),preferences-color
^sep($SOFT_MANAGEMENT)
$PAMAC_UPDATE,pamac-manager --updates,system-upgrade
$CLI_UPDATE,^term(sudo pacman -Syyu),openterm
$CLI_UPDATE,^term(yay -Syyu;read -p "${FINISHED}"),openterm
$PAMAC,pamac-manager,pamac
$RENEW_KEYS,^term(sudo pacman -Sy archlinux-keyring manjaro-keyring mabox-keyring),keysync
$RENEW_KEYS,^term(sudo pacman -Sy archlinux-keyring manjaro-keyring mabox-keyring;read -p "${FINISHED}"),keysync
$MIRROR_RANK,^root(mirrory),download
^sep($HELP)
@ -493,9 +528,9 @@ $SYSINFO,^pipe(jgsysinfo-pipe),distributor-logo-linux
⮜ $BACK,^back()
^tag(mirrory)
$FAST <small>pacman-mirrors -f5</small>,^term(sudo pacman-mirrors -f5)
$ALL <small>pacman-mirrors -i -c all</small>,^term(sudo pacman-mirrors -i -c all)
$GEOIP <small>pacman-mirrors -i --geoip</small>,^term(sudo pacman-mirrors -i --geoip)
$FAST <small>pacman-mirrors -f5</small>,^term(sudo pacman-mirrors -f5;read -p "${FINISHED}")
$ALL <small>pacman-mirrors -i -c all</small>,^term(sudo pacman-mirrors -i -c all;read -p "${FINISHED}")
$GEOIP <small>pacman-mirrors -i --geoip</small>,^term(sudo pacman-mirrors -i --geoip;read -p "${FINISHED}")
^sep()
⮜ $BACK,^back()
@ -558,7 +593,8 @@ mb-setvar jgtools_last="\"places\""
CONFIG_FILE=$(mktemp)
MENU_ITEMS=$(mktemp)
QNAV=$(mktemp)
trap "rm -f ${CONFIG_FILE} ${MENU_ITEMS} ${QNAV}" EXIT
LHEAD=$(mktemp)
trap "rm -f ${CONFIG_FILE} ${MENU_ITEMS} ${QNAV} ${LHEAD}" EXIT
case $LANG in
pl*)
@ -685,14 +721,39 @@ fi
if [[ -x "$(command -v VBoxManage)" ]]; then
[[ $places_vboxes == true ]] && vboxes=". $HOME/.config/mabox/vboxes.csv" || vboxes=""
fi
if [ $panels_heightpos == "full" ]; then
WALLPALDIR="$HOME/.config/colormenu/palettes/wallp"
mkdir -p "$WALLPALDIR"
read WALLPATH<<< $(grep file "$HOME"/.config/nitrogen/bg-saved.cfg | cut -d'=' -f2)
WALLPAPER=${WALLPATH##*/}
THUMBDIR="$HOME/.config/mabox/wallthumbs"
mkdir -p ${THUMBDIR}
THUMB="${THUMBDIR}/${WALLPAPER}.png"
if [[ ! -f "$THUMB" ]]
then
convert ${WALLPATH} -resize 270x150^ -gravity center -extent 270x150 ${THUMB}
fi
JGWIDTH=$((jgtools_padding + 248 + jgtools_padding))
MENU_PADDING_TOP=$((jgtools_padding + 148))
cat <<EOF > ${LHEAD}
@icon,,$((jgtools_padding)),$((jgtools_padding)),248,148,4,left,top,,,${THUMB}
@icon,,$((jgtools_padding - 6)),$((jgtools_padding - 6)),48,48,4,left,top,,,/usr/share/icons/hicolor/48x48/apps/mbcc.png
@rect,,$((jgtools_padding + 82)),$((jgtools_padding + 109)),160,26,2,left,top,#222222 50,#FFFFFF 80,
@text,,$((jgtools_padding + 90)),$((jgtools_padding + 113)),180,20,4,left,top,#222222,auto,$OSNAME $OSVERSION <sup><i>$OSCODE</i></sup>
#@text,,$((jgtools_padding + 62)),$((jgtools_padding + 30)),180,20,4,left,top,#222222,#444444,<small>$USER@$HOSTNAME</small>
EOF
else
cat <<EOF > ${LHEAD}
@icon,,$((jgtools_padding + 2)),$((jgtools_padding + 10)),48,48,4,left,top,,,/usr/share/icons/hicolor/48x48/apps/mbcc.png
@text,,$((jgtools_padding + 62)),$((jgtools_padding + 10)),200,20,4,left,top,auto,#111111,<big>$OSNAME $OSVERSION</big> <sup><i>$OSCODE</i></sup>
@text,,$((jgtools_padding + 62)),$((jgtools_padding + 30)),200,20,4,left,top,auto,#444444,<small>$USER@$HOSTNAME</small>
EOF
fi
mkconfigfile
cat <<EOF > ${MENU_ITEMS}
@icon,,$((jgtools_padding + 2)),$((jgtools_padding + 10)),48,48,4,left,top,,,/usr/share/icons/hicolor/48x48/apps/mbcc.png
@text,,$((jgtools_padding + 62)),$((jgtools_padding + 10)),200,20,4,left,top,auto,#111111,<big>$OSNAME $OSVERSION</big> <sup><i>$OSCODE</i></sup>
@text,,$((jgtools_padding + 62)),$((jgtools_padding + 30)),200,20,4,left,top,auto,#444444,<small>$USER@$HOSTNAME</small>
. ${LHEAD}
. $HOME/.config/mabox/places-prepend.csv
. ${QNAV}