summaryrefslogtreecommitdiffstats
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
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.
-rw-r--r--daw/liveslak-daw.directory6
-rw-r--r--daw/liveslak-daw.menu19
-rw-r--r--daw/liveslak-daw.pngbin0 -> 29903 bytes
-rwxr-xr-xmake_slackware_live.sh31
4 files changed, 56 insertions, 0 deletions
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 @@
+<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN" "http://www.freedesktop.org/standards/menu-spec/menu-1.0.dtd">
+<Menu>
+ <Name>Applications</Name>
+ <Menu>
+ <Name>Multimedia</Name>
+ <Move>
+ <Old>X42 Plugins</Old>
+ <New>Slackware Live Daw/X42 Plugins</New>
+ </Move>
+ <Menu>
+ <Name>Slackware Live Daw</Name>
+ <Directory>liveslak-daw.directory</Directory>
+ <Include>
+ <Category>X-DAW</Category>
+ </Include>
+ </Menu>
+ </Menu>
+</Menu>
+
diff --git a/daw/liveslak-daw.png b/daw/liveslak-daw.png
new file mode 100644
index 0000000..7eea5a2
--- /dev/null
+++ b/daw/liveslak-daw.png
Binary files 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