summaryrefslogtreecommitdiffstats
path: root/make_slackware_live.sh
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2020-09-19 21:52:53 +0200
committer Eric Hameleers <alien@slackware.com>2020-09-19 21:52:53 +0200
commit1aed195f89d154f75914bdfb4746fcb1618fe1d9 (patch)
tree71b2e78b9a8e4d945f24ca4df06529f378fcf9a4 /make_slackware_live.sh
parentbe321251b722b5ae7eef1945b17e214533c9c893 (diff)
downloadliveslak-1aed195f89d154f75914bdfb4746fcb1618fe1d9.tar.gz
liveslak-1aed195f89d154f75914bdfb4746fcb1618fe1d9.tar.xz
DAW: move all DAW programs into a new submenu 'Slackware Live DAW'
The new submenu hierarchy is "Applications > Multimedia > Slackware Live DAW". All applications from the DAW package list are moved into that new menu, this will un-clutter the parent Multimedia menu.
Diffstat (limited to '')
-rwxr-xr-xmake_slackware_live.sh31
1 files changed, 31 insertions, 0 deletions
diff --git a/make_slackware_live.sh b/make_slackware_live.sh
index 3670a75..ebeb268 100755
--- a/make_slackware_live.sh
+++ b/make_slackware_live.sh
@@ -2154,6 +2154,37 @@ EOT
cp -a ${LIVE_ROOTDIR}/usr/share/applications/qjackctl.desktop \
${LIVE_ROOTDIR}/home/${LIVEUID}/.config/autostart
+ # Add all our programs into their own submenu Applications>Multimedia>DAW
+ # to avoid clutter in the Multimedia menu. We will use a custom category
+ # "X-DAW" to decide what goes into the new submenu.
+ # Also move the existing X42-Plugins submenu below the new DAW submenu.
+ # see https://specifications.freedesktop.org/menu-spec/menu-spec-1.0.html
+ install -Dm 644 ${LIVE_TOOLDIR}/${LIVEDE,,}/liveslak-daw.menu \
+ -t $LIVE_ROOTDIR/etc/xdg/menus/applications-merged/
+ install -Dm 644 ${LIVE_TOOLDIR}/${LIVEDE,,}/liveslak-daw.directory \
+ -t $LIVE_ROOTDIR/usr/share/desktop-directories/
+ install -Dm 644 ${LIVE_TOOLDIR}/${LIVEDE,,}/liveslak-daw.png \
+ -t $LIVE_ROOTDIR/usr/share/icons/hicolor/256x256/apps/
+
+ # Any menu entry that does not yet have a Category "X-DAW" will now have to
+ # get that added so that our mew submenu will be populated:
+ for DAWPKG in $(cat ${LIVE_TOOLDIR}/pkglists/z03_daw.lst |grep -v x42 |grep -Ev '(^ *#)' ) ; do
+ # Find the installed full package name belonging to the DAW package:
+ PKGINST=$( ls -1 ${LIVE_ROOTDIR}/var/log/packages/${DAWPKG}* 2>/dev/null |grep -E "/var/log/packages/${DAWPKG}-[^-]+-[^-]+-[^-]+" || true)
+ if [ -n "${PKGINST}" ]; then
+ for DESKTOPF in $(grep 'usr/share/applications/.*.desktop' ${PKGINST})
+ do
+ if ! grep -q X-DAW ${LIVE_ROOTDIR}/${DESKTOPF} ; then
+ sed -i ${LIVE_ROOTDIR}/${DESKTOPF} \
+ -e "s/^Categories=\(.*\)/Categories=X-DAW;\1/"
+ fi
+ # Hide the application in Multimedia (which is based on the AudioVideo
+ # category) to prevent them from getting listed twice:
+ sed -i ${LIVE_ROOTDIR}/${DESKTOPF} -e "/^Categories=/s/AudioVideo;//"
+ done
+ fi
+ done
+
fi # End LIVEDE = DAW
if [ "$LIVEDE" = "STUDIOWARE" ]; then