Skip to content

Commit

Permalink
fix: autostart volumeicon
Browse files Browse the repository at this point in the history
  • Loading branch information
ben-grande committed Jan 2, 2024
1 parent a434aea commit fa22308
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 1 deletion.
3 changes: 2 additions & 1 deletion salt/sys-audio/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

Expand All @@ -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
```
<!-- pkg:end:post-install -->

Expand Down
27 changes: 27 additions & 0 deletions salt/sys-audio/configure-dvm.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{#
SPDX-FileCopyrightText: 2023 Benjamin Grande M. S. <[email protected]>

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 -%}
10 changes: 10 additions & 0 deletions salt/sys-audio/configure-dvm.top
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{#
SPDX-FileCopyrightText: 2023 Benjamin Grande M. S. <[email protected]>

SPDX-License-Identifier: AGPL-3.0-or-later
#}

base:
'*':
- match: nodegroup
- sys-audio.configure-dvm
1 change: 1 addition & 0 deletions salt/sys-audio/create.sls
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ prefs:
features:
- enable:
- servicevm
- service.audiovm
- disable:
- service.cups
- service.cups-browsed
Expand Down
13 changes: 13 additions & 0 deletions salt/sys-audio/files/dvm/volumeicon.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# SPDX-FileCopyrightText: 2023 Benjamin Grande M. S. <[email protected]>
#
# 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;
2 changes: 2 additions & 0 deletions salt/sys-audio/init.top
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ base:
- sys-audio.create
'tpl-sys-audio':
- sys-audio.install
'dvm-sys-audio':
- sys-audio.configure-dvm

0 comments on commit fa22308

Please sign in to comment.