mabox-software-pipemenu
This commit is contained in:
parent
2ff3641e14
commit
84c0183f8e
113
usr/bin/mabox-software-pipemenu
Executable file
113
usr/bin/mabox-software-pipemenu
Executable file
@ -0,0 +1,113 @@
|
||||
#!/bin/bash
|
||||
# mabox-software-pipemenu - an Openbox pipemenu to manage software updates, install popular applications, etc.
|
||||
|
||||
MB_COMMON_LIBDIR="/usr/lib/mabox/mabox-common"
|
||||
|
||||
|
||||
if ! . "$MB_COMMON_LIBDIR/mabox-include.cfg" 2> /dev/null; then
|
||||
echo $"Error: Failed to locate mabox-include.cfg in $MB_COMMON_LIBDIR" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case $LANG in
|
||||
pl*)
|
||||
SYSUPDATE="Aktualizacja systemu"
|
||||
MIRR_RANK="Ranking mirrorów"
|
||||
MIRROR_RANK="Tworzenie rankingu mirrorów"
|
||||
RENEWKEYS="Odnawianie kluczy"
|
||||
ALL="Wszystkie"
|
||||
GEOIP="Najbliższe (wg geoip)"
|
||||
SOFT_MANAGEMENT="Zarządzanie oprogramowaniem"
|
||||
POPULAR_APPS="Popularne programy"
|
||||
INSTALL="Instaluj"
|
||||
INSTALLING="Instalowanie"
|
||||
LAUNCH="Uruchom"
|
||||
GRAPHICS="Grafika"
|
||||
GAMES="Gry"
|
||||
REG_MENU="Regeneruj Menu"
|
||||
;;
|
||||
*)
|
||||
SYSUPDATE="System update"
|
||||
MIRR_RANK="Rank mirrors"
|
||||
MIRROR_RANK="Create mirror rank"
|
||||
ALL="All"
|
||||
GEOIP="by geoip"
|
||||
RENEWKEYS="Renew keys"
|
||||
SOFT_MANAGEMENT="Software Management"
|
||||
POPULAR_APPS="Applications"
|
||||
INSTALL="Install"
|
||||
INSTALLING="Installing"
|
||||
LAUNCH="Launch"
|
||||
GRAPHICS="Graphics"
|
||||
GAMES="Gry"
|
||||
REG_MENU="Regenerate Menu"
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
if [[ $1 = '--update' ]]; then
|
||||
terminator --title="$SYSUPDATE" --command='sudo pacman -Syu'
|
||||
|
||||
elif [[ $1 = '--rank-all' ]]; then
|
||||
terminator --title="$MIRROR_RANK" --command='sudo pacman-mirrors -i -c all'
|
||||
elif [[ $1 = '--rank-geoip' ]]; then
|
||||
terminator --title="$MIRROR_RANK" --command='sudo pacman-mirrors -i --geoip'
|
||||
elif [[ $1 = '--fixkeys' ]]; then
|
||||
terminator --title="$RENEWKEYS" --command='sudo pacman -Sy archlinux-keyring manjaro-keyring mabox-keyring'
|
||||
else
|
||||
menuStart
|
||||
menuSeparator "$SOFT_MANAGEMENT"
|
||||
menuItem "$SYSUPDATE" "mabox-software-pipemenu --update"
|
||||
menuSubmenu 'rank' "$MIRR_RANK"
|
||||
menuItem "$ALL" "mabox-software-pipemenu --rank-all"
|
||||
menuItem "$GEOIP" "mabox-software-pipemenu --rank-geoip"
|
||||
menuSubmenuEnd
|
||||
menuItem "$RENEWKEYS" "mabox-software-pipemenu --fixkeys"
|
||||
menuSeparator "$POPULAR_APPS"
|
||||
menuSubmenu 'internet' 'Internet'
|
||||
internet=('chromium' 'firefox' 'opera' 'thunderbird' 'dropbox')
|
||||
for curApp in "${internet[@]}"; do
|
||||
if ! type "$curApp" &> /dev/null; then
|
||||
menuItem "$INSTALL ${curApp^}" "terminator --title='$INSTALLING ${curApp^}' --command='sudo pacman -S $curApp'"
|
||||
else
|
||||
menuItem "$LAUNCH ${curApp^}" "$curApp"
|
||||
fi
|
||||
done
|
||||
menuSubmenuEnd
|
||||
|
||||
menuSubmenu 'multimedia' 'Multimedia'
|
||||
multimedia=('kodi' 'audacious' 'vlc' 'smplayer' 'simplescreenrecorder')
|
||||
for curApp in "${multimedia[@]}"; do
|
||||
if ! type "$curApp" &> /dev/null; then
|
||||
menuItem "$INSTALL ${curApp^}" "terminator --title='$INSTALLING ${curApp^}' --command='sudo pacman -S $curApp'"
|
||||
else
|
||||
menuItem "$LAUNCH ${curApp^}" "$curApp"
|
||||
fi
|
||||
done
|
||||
menuSubmenuEnd
|
||||
|
||||
menuSubmenu 'grafika' "$GRAPHICS"
|
||||
grafika=('gimp' 'inkscape' 'blender')
|
||||
for curApp in "${grafika[@]}"; do
|
||||
if ! type "$curApp" &> /dev/null; then
|
||||
menuItem "$INSTALL ${curApp^}" "terminator --title='$INSTALLING ${curApp^}' --command='sudo pacman -S $curApp'"
|
||||
else
|
||||
menuItem "$LAUNCH ${curApp^}" "$curApp"
|
||||
fi
|
||||
done
|
||||
menuSubmenuEnd
|
||||
menuSubmenu 'gry' "$GAMES"
|
||||
gry=('playonlinux' 'steam-manjaro' 'wesnoth')
|
||||
for curApp in "${gry[@]}"; do
|
||||
if ! type "$curApp" &> /dev/null; then
|
||||
menuItem "$INSTALL ${curApp^}" "terminator --title='$INSTALLING ${curApp^}' --command='sudo pacman -S $curApp'"
|
||||
else
|
||||
menuItem "$LAUNCH ${curApp^}" "$curApp"
|
||||
fi
|
||||
done
|
||||
menuSubmenuEnd
|
||||
menuSeparator
|
||||
menuItem "$REG_MENU" "mb-regenerate-menu"
|
||||
menuEnd
|
||||
fi
|
||||
exit 0
|
Loading…
Reference in New Issue
Block a user