From 5d6a50c286fa0301a46ede3f8ad9cbca38e9ea02 Mon Sep 17 00:00:00 2001 From: Ben Grande Date: Fri, 19 Jul 2024 15:14:40 +0200 Subject: [PATCH] fix: add media appmenus --- rpm_spec/qusal-media.spec | 5 ++++- salt/media/README.md | 6 +++++- salt/media/appmenus.sls | 8 ++++++++ salt/media/appmenus.top | 10 ++++++++++ salt/media/create.sls | 23 ++++++++++++++++++++--- salt/media/install.sls | 1 + 6 files changed, 48 insertions(+), 5 deletions(-) create mode 100644 salt/media/appmenus.sls create mode 100644 salt/media/appmenus.top diff --git a/rpm_spec/qusal-media.spec b/rpm_spec/qusal-media.spec index 46f3422..cf6c075 100644 --- a/rpm_spec/qusal-media.spec +++ b/rpm_spec/qusal-media.spec @@ -37,7 +37,9 @@ Requires: qusal-utils %description Creates the offline "media" qube for storing multimedia files and open the -files in a named disposable "disp-media" via MIME configuration. +files in a named disposable "disp-media" via MIME configuration. You can also +connect any disposable qube based on "dvm-media" to a netvm and gather media +over the network. %prep %setup -q @@ -76,6 +78,7 @@ if test "$1" = "1"; then qubesctl state.apply media.create qubesctl --skip-dom0 --targets=tpl-media state.apply media.install qubesctl --skip-dom0 --targets=media state.apply media.configure + qubesctl state.apply media.appmenus elif test "$1" = "2"; then ## Upgrade true diff --git a/salt/media/README.md b/salt/media/README.md index 185f37d..cf21065 100644 --- a/salt/media/README.md +++ b/salt/media/README.md @@ -12,7 +12,9 @@ Media opener through disposables in Qubes OS. ## Description Creates the offline "media" qube for storing multimedia files and open the -files in a named disposable "disp-media" via MIME configuration. +files in a named disposable "disp-media" via MIME configuration. You can also +connect any disposable qube based on "dvm-media" to a netvm and gather media +over the network. ## Installation @@ -22,6 +24,7 @@ files in a named disposable "disp-media" via MIME configuration. sudo qubesctl top.enable media sudo qubesctl --targets=tpl-media,media state.apply sudo qubesctl top.disable media +sudo qubesctl state.apply media.appmenus ``` * State: @@ -32,6 +35,7 @@ sudo qubesctl top.disable media sudo qubesctl state.apply media.create sudo qubesctl --skip-dom0 --targets=tpl-media state.apply media.install sudo qubesctl --skip-dom0 --targets=media state.apply media.configure +sudo qubesctl state.apply media.appmenus ``` diff --git a/salt/media/appmenus.sls b/salt/media/appmenus.sls new file mode 100644 index 0000000..a84a247 --- /dev/null +++ b/salt/media/appmenus.sls @@ -0,0 +1,8 @@ +{# +SPDX-FileCopyrightText: 2023 Benjamin Grande M. S. + +SPDX-License-Identifier: AGPL-3.0-or-later +#} + +{% from 'utils/macros/sync-appmenus.sls' import sync_appmenus -%} +{{ sync_appmenus('tpl-' ~ sls_path) }} diff --git a/salt/media/appmenus.top b/salt/media/appmenus.top new file mode 100644 index 0000000..df35569 --- /dev/null +++ b/salt/media/appmenus.top @@ -0,0 +1,10 @@ +{# +SPDX-FileCopyrightText: 2023 Benjamin Grande M. S. + +SPDX-License-Identifier: AGPL-3.0-or-later +#} + +base: + 'dom0': + - match: nodegroup + - media.appmenus diff --git a/salt/media/create.sls b/salt/media/create.sls index f3b0b91..6f74cac 100644 --- a/salt/media/create.sls +++ b/salt/media/create.sls @@ -19,6 +19,12 @@ require: - sls: {{ slsdotpath }}.clone prefs: - audiovm: "" +features: +- set: + # editorconfig-checker-disable + - default-menu-items: "calibre-ebook-edit.desktop calibre-ebook-viewer.desktop calibre-gui.desktop calibre-lrfviewer.desktop chromium.desktop gpicview.desktop mpv.desktop org.xfce.mousepad.desktop vlc.desktop xpdf.desktop qubes-run-terminal.desktop qubes-start.desktop" # noqa: 204 + - menu-items: "calibre-ebook-edit.desktop calibre-ebook-viewer.desktop calibre-gui.desktop calibre-lrfviewer.desktop chromium.desktop gpicview.desktop mpv.desktop org.xfce.mousepad.desktop vlc.desktop xpdf.desktop qubes-run-terminal.desktop qubes-start.desktop" # noqa: 204 + # editorconfig-checker-enable {%- endload %} {{ load(defaults) }} @@ -47,6 +53,8 @@ features: - service.tinyproxy - service.tracker - service.evolution-data-server +- set: + - menu-items: "qubes-run-terminal.desktop qubes-start.desktop" {%- endload %} {{ load(defaults) }} @@ -69,12 +77,18 @@ prefs: - template_for_dispvms: True - include_in_backups: False features: +- enable: + - appmenus-dispvm - disable: - service.cups - service.cups-browsed - service.tinyproxy - service.tracker - service.evolution-data-server +- set: + # editorconfig-checker-disable + - menu-items: "calibre-ebook-edit.desktop calibre-ebook-viewer.desktop calibre-gui.desktop calibre-lrfviewer.desktop chromium.desktop gpicview.desktop mpv.desktop org.xfce.mousepad.desktop vlc.desktop xpdf.desktop qubes-run-terminal.desktop qubes-start.desktop" # noqa: 204 + # editorconfig-checker-enable {%- endload %} {{ load(defaults) }} @@ -98,15 +112,18 @@ prefs: - autostart: False - include_in_backups: False features: -- appmenus-dispvm: True +- enable: + - service.shutdown-idle - disable: - service.cups - service.cups-browsed - service.tinyproxy - service.tracker - service.evolution-data-server -- enable: - - service.shutdownle +- set: + # editorconfig-checker-disable + - menu-items: "calibre-ebook-edit.desktop calibre-ebook-viewer.desktop calibre-gui.desktop calibre-lrfviewer.desktop chromium.desktop gpicview.desktop mpv.desktop org.xfce.mousepad.desktop vlc.desktop xpdf.desktop qubes-run-terminal.desktop qubes-start.desktop" # noqa: 204 + # editorconfig-checker-enable {%- endload %} {{ load(defaults) }} diff --git a/salt/media/install.sls b/salt/media/install.sls index 04f2859..89d8b24 100644 --- a/salt/media/install.sls +++ b/salt/media/install.sls @@ -29,6 +29,7 @@ include: - gpicview - mousepad - mpv + - yt-dlp - vlc - xpdf - man-db