From 7e9a29f8eef3b55be51b52e9a86ad9e07d3da3fb Mon Sep 17 00:00:00 2001 From: B Stack Date: Tue, 7 Jan 2020 16:19:31 -0500 Subject: add dpkg-trigger function to xdgmenumaker Partially as a proof of concept, as well as to facilitate the auto-generation of xdg-compatible menu in fluxbox. --- xdgmenumaker/debian/README.Debian | 2 ++ xdgmenumaker/debian/changelog | 6 ++++++ xdgmenumaker/debian/control | 1 + xdgmenumaker/debian/dirs | 1 + xdgmenumaker/debian/postinst | 18 ++++++++++++++++++ xdgmenumaker/debian/triggers | 1 + 6 files changed, 29 insertions(+) create mode 100644 xdgmenumaker/debian/dirs create mode 100644 xdgmenumaker/debian/postinst create mode 100644 xdgmenumaker/debian/triggers (limited to 'xdgmenumaker/debian') diff --git a/xdgmenumaker/debian/README.Debian b/xdgmenumaker/debian/README.Debian index d848ae3..76201e7 100644 --- a/xdgmenumaker/debian/README.Debian +++ b/xdgmenumaker/debian/README.Debian @@ -1,5 +1,7 @@ xdgmenumaker for Devuan Initial build +References include: + https://stackoverflow.com/questions/1908610/how-to-get-pid-of-background-process/1911387#1911387 -- B Stack Sun, 05 Jan 2020 08:33:14 -0500 diff --git a/xdgmenumaker/debian/changelog b/xdgmenumaker/debian/changelog index b43d542..18ed8ef 100644 --- a/xdgmenumaker/debian/changelog +++ b/xdgmenumaker/debian/changelog @@ -1,3 +1,9 @@ +xdgmenumaker (1.5-2+devuan) obs; urgency=low + + * Add triggers to generate a fluxbox menu + + -- B Stack Tue, 07 Jan 2020 15:16:14 -0500 + xdgmenumaker (1.5-1+devuan) manual; urgency=low * Initial release diff --git a/xdgmenumaker/debian/control b/xdgmenumaker/debian/control index 91d403d..53ef3cf 100644 --- a/xdgmenumaker/debian/control +++ b/xdgmenumaker/debian/control @@ -11,6 +11,7 @@ Homepage: https://github.com/gapan/xdgmenumaker Package: xdgmenumaker Architecture: any Multi-Arch: foreign +Pre-Depends: xvfb Depends: ${misc:Depends}, ${shlibs:Depends}, python3, python3-xdg, diff --git a/xdgmenumaker/debian/dirs b/xdgmenumaker/debian/dirs new file mode 100644 index 0000000..9a1ad7d --- /dev/null +++ b/xdgmenumaker/debian/dirs @@ -0,0 +1 @@ +etc/xdgmenumaker diff --git a/xdgmenumaker/debian/postinst b/xdgmenumaker/debian/postinst new file mode 100644 index 0000000..bcb1008 --- /dev/null +++ b/xdgmenumaker/debian/postinst @@ -0,0 +1,18 @@ +#!/bin/sh +# xdgmenumaker postinst + +case "$1" in + triggered) + Xvfb :18 & + result=$! + export DISPLAY=:18 + for word in fluxbox ; + do + /usr/bin/xdgmenumaker -f "${word}" -i > "/etc/xdgmenumaker/${word}" 2>/dev/null + done + kill $result + ;; + *) + : + ;; +esac diff --git a/xdgmenumaker/debian/triggers b/xdgmenumaker/debian/triggers new file mode 100644 index 0000000..aa950b6 --- /dev/null +++ b/xdgmenumaker/debian/triggers @@ -0,0 +1 @@ +interest-noawait /usr/share/applications -- cgit