From fa223082009f57d10d2ceda9060f0fe0644a535a Mon Sep 17 00:00:00 2001 From: Ben Grande Date: Tue, 2 Jan 2024 23:01:58 +0100 Subject: [PATCH] fix: autostart volumeicon --- salt/sys-audio/README.md | 3 ++- salt/sys-audio/configure-dvm.sls | 27 +++++++++++++++++++++ salt/sys-audio/configure-dvm.top | 10 ++++++++ salt/sys-audio/create.sls | 1 + salt/sys-audio/files/dvm/volumeicon.desktop | 13 ++++++++++ salt/sys-audio/init.top | 2 ++ 6 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 salt/sys-audio/configure-dvm.sls create mode 100644 salt/sys-audio/configure-dvm.top create mode 100644 salt/sys-audio/files/dvm/volumeicon.desktop diff --git a/salt/sys-audio/README.md b/salt/sys-audio/README.md index a7faa33f..d41c823a 100644 --- a/salt/sys-audio/README.md +++ b/salt/sys-audio/README.md @@ -20,7 +20,7 @@ provided state. - Top ```sh qubesctl top.enable sys-audio -qubesctl --targets=tpl-sys-audio state.apply +qubesctl --targets=tpl-sys-audio,dvm-sys-audio state.apply qubesctl top.disable sys-audio ``` @@ -29,6 +29,7 @@ qubesctl top.disable sys-audio ```sh qubesctl state.apply sys-audio.create qubesctl --skip-dom0 --targets=tpl-sys-audio state.apply sys-audio.install +qubesctl --skip-dom0 --targets=dvm-sys-audio state.apply sys-audio.configure-dvm ``` diff --git a/salt/sys-audio/configure-dvm.sls b/salt/sys-audio/configure-dvm.sls new file mode 100644 index 00000000..7900c109 --- /dev/null +++ b/salt/sys-audio/configure-dvm.sls @@ -0,0 +1,27 @@ +{# +SPDX-FileCopyrightText: 2023 Benjamin Grande M. S. + +SPDX-License-Identifier: AGPL-3.0-or-later +#} + +{% if grains['nodename'] != 'dom0' -%} + +"{{ slsdotpath }}-autostart-volumeicon-systray": + file.managed: + - name: /home/user/.local/share/applications/volumeicon.desktop + - source: salt://{{ slsdotpath }}/files/dvm/volumeicon.desktop + - mode: '0644' + - user: user + - group: user + - makedirs: True + +"{{ slsdotpath }}-desktop-autostart": + file.symlink: + - name: /home/user/.config/autostart/volumeicon.desktop + - target: /home/user/.local/share/applications/volumeicon.desktop + - user: user + - group: user + - force: True + - makedirs: True + +{% endif -%} diff --git a/salt/sys-audio/configure-dvm.top b/salt/sys-audio/configure-dvm.top new file mode 100644 index 00000000..0804a83f --- /dev/null +++ b/salt/sys-audio/configure-dvm.top @@ -0,0 +1,10 @@ +{# +SPDX-FileCopyrightText: 2023 Benjamin Grande M. S. + +SPDX-License-Identifier: AGPL-3.0-or-later +#} + +base: + '*': + - match: nodegroup + - sys-audio.configure-dvm diff --git a/salt/sys-audio/create.sls b/salt/sys-audio/create.sls index 659cd412..102e88e2 100644 --- a/salt/sys-audio/create.sls +++ b/salt/sys-audio/create.sls @@ -59,6 +59,7 @@ prefs: features: - enable: - servicevm + - service.audiovm - disable: - service.cups - service.cups-browsed diff --git a/salt/sys-audio/files/dvm/volumeicon.desktop b/salt/sys-audio/files/dvm/volumeicon.desktop new file mode 100644 index 00000000..a1b570d9 --- /dev/null +++ b/salt/sys-audio/files/dvm/volumeicon.desktop @@ -0,0 +1,13 @@ +# SPDX-FileCopyrightText: 2023 Benjamin Grande M. S. +# +# SPDX-License-Identifier: AGPL-3.0-or-later + +[Desktop Entry] +Name=Volueicon +Exec=volumeicon +Icon=/usr/share/volumeicons/icons/tango/8.png +Terminal=false +X-MultipleArgs=False +Type=Application +Keywords=audio;volume; +Categories=Audio; diff --git a/salt/sys-audio/init.top b/salt/sys-audio/init.top index 3f9603bb..054dda82 100644 --- a/salt/sys-audio/init.top +++ b/salt/sys-audio/init.top @@ -10,3 +10,5 @@ base: - sys-audio.create 'tpl-sys-audio': - sys-audio.install + 'dvm-sys-audio': + - sys-audio.configure-dvm