From 1aed195f89d154f75914bdfb4746fcb1618fe1d9 Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Sat, 19 Sep 2020 21:52:53 +0200 Subject: 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. --- daw/liveslak-daw.directory | 6 ++++++ daw/liveslak-daw.menu | 19 +++++++++++++++++++ daw/liveslak-daw.png | Bin 0 -> 29903 bytes make_slackware_live.sh | 31 +++++++++++++++++++++++++++++++ 4 files changed, 56 insertions(+) create mode 100644 daw/liveslak-daw.directory create mode 100644 daw/liveslak-daw.menu create mode 100644 daw/liveslak-daw.png diff --git a/daw/liveslak-daw.directory b/daw/liveslak-daw.directory new file mode 100644 index 0000000..074d67a --- /dev/null +++ b/daw/liveslak-daw.directory @@ -0,0 +1,6 @@ +[Desktop Entry] +Name=Slackware Live DAW +Icon=liveslak-daw +Type=Directory +Keywords=audio;sound;jackd;studio; +Comment=Slackware Digital Audio Workstation diff --git a/daw/liveslak-daw.menu b/daw/liveslak-daw.menu new file mode 100644 index 0000000..27b7341 --- /dev/null +++ b/daw/liveslak-daw.menu @@ -0,0 +1,19 @@ + + + Applications + + Multimedia + + X42 Plugins + Slackware Live Daw/X42 Plugins + + + Slackware Live Daw + liveslak-daw.directory + + X-DAW + + + + + diff --git a/daw/liveslak-daw.png b/daw/liveslak-daw.png new file mode 100644 index 0000000..7eea5a2 Binary files /dev/null and b/daw/liveslak-daw.png differ 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 -- cgit v1.2.3