Plasma 5: Add KDE-Apps Category Menus

This commit is contained in:
MatMoul 2015-12-20 13:05:08 +01:00
parent d5be0c2cb9
commit c19bfa51ec
3 changed files with 85 additions and 2 deletions

View file

@ -4,9 +4,11 @@
options=()
options+=("Plasma Packages" "")
options+=("Localisations" "kde-l10n-")
options+=("KDE Apps Meta Full" "kde-applications-meta")
options+=("KDE Apps Full Meta" "kde-applications-meta")
options+=("KDE Apps Full" "kde-applications")
options+=("KDE Apps" "")
options+=("KDE Apps Categories Meta" "")
options+=("KDE Apps Categories" "")
options+=("Complements" "")
defaultitem=""
@ -21,7 +23,7 @@ sed -i "/^defaultitem=/c\defaultitem=\"$sel\"" $0
case $sel in
'Plasma Packages') script install/desktop/plasma5/plasma-packages;;
'Localisations') script install/desktop/plasma5/localisations;;
'KDE Apps Meta Full')
'KDE Apps Full Meta')
if ( confirm "This option install all KDE applications with meta packages.\n\nInstall KDE Meta Full (pacman -S kde-applications-meta) ?" ) then
instpkg "kde-applications-meta" ""
fi
@ -32,6 +34,8 @@ case $sel in
fi
;;
'KDE Apps') script install/desktop/plasma5/kdeapps;;
'KDE Apps Categories Meta') script install/desktop/plasma5/metapackages;;
'KDE Apps Categories') script install/desktop/plasma5/packagecategories;;
'Complements') script install/desktop/plasma5/complements;;
esac

View file

@ -0,0 +1,35 @@
#!/bin/bash
. ./lib
options=()
items=$(for i in $(pacman -Sqg kde-applications-meta); do echo ${i#kde-meta-};done)
for item in $items; do
case $item in
"kdebase") options+=("$item" "" on);;
"kdeadmin") options+=("$item" "" on);;
"kdegraphics") options+=("$item" "" on);;
"kdemultimedia") options+=("$item" "" on);;
"kdeutils") options+=("$item" "" on);;
"kdepim") options+=("$item" "" on);;
"kdeartwork") options+=("$item" "" on);;
"kde-wallpapers") ;;
*) options+=("$item" "" off);;
esac
done
sel=$(whiptail --backtitle "$apptitle" --title "KDE App Meta Packages :" --checklist "" --cancel-button "Back" 0 0 0 \
"${options[@]}" \
3>&1 1>&2 2>&3)
if [ ! "$?" = "0" ]; then
exit 1
fi
for itm in $sel; do
pkg="$pkg $(echo $itm | sed 's/"//g')"
done
instpkg "$pkg" "$aurpkg"
exit 0

View file

@ -0,0 +1,44 @@
#!/bin/bash
. ./lib
options=()
options+=("kdebase" "")
options+=("kdeadmin" "")
options+=("kdeutils" "")
options+=("kdegraphics" "")
options+=("kdemultimedia" "")
options+=("kdenetwork" "")
options+=("kdesdk" "")
options+=("kdepim" "")
items=$(for i in $(pacman -Sqg kde-applications-meta); do echo ${i#kde-meta-};done)
for item in $items; do
case $item in
"kdebase") ;;
"kdeadmin") ;;
"kdeutils") ;;
"kdegraphics") ;;
"kdemultimedia") ;;
"kdenetwork") ;;
"kdesdk") ;;
"kdepim") ;;
"kde-wallpapers") ;;
"telepathy-kde-meta") ;;
*) options+=("$item" "");;
esac
done
defaultitem=""
sel=$(whiptail --backtitle "$apptitle" --title "KDE App Categories :" --menu "" --default-item "$defaultitem" --cancel-button "Back" 0 0 0 \
"${options[@]}" \
3>&1 1>&2 2>&3)
if [ ! "$?" = "0" ]; then
exit 1
fi
sed -i "/^defaultitem=/c\defaultitem=\"$sel\"" $0
require install/desktop/kde4/packages 755
sed -i "/^package=/c\package=\"$sel\"" install/desktop/kde4/packages
script install/desktop/kde4/packages
exit 0