-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: install screenshot dependencies
Provided in the default Dom0 installation as it brings a much better usability and small packages. KDE ships with kdialog but without a screenshot utility. Xfce ships with xfce4-screenshooter but without a dialog utility. Scrot and Zenity are minimal tools that works on both DEs and are very small packages. Fixes: #22
- Loading branch information
1 parent
05e9854
commit 47dc694
Showing
5 changed files
with
65 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,5 +14,6 @@ include: | |
- .kde | ||
- .update-settings | ||
- .xorg | ||
- .screenshot | ||
|
||
{% endif -%} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{# | ||
SPDX-FileCopyrightText: 2024 Benjamin Grande M. S. <ben.grande.b@gmail.com> | ||
|
||
SPDX-License-Identifier: AGPL-3.0-or-later | ||
#} | ||
|
||
{% if grains['nodename'] == 'dom0' -%} | ||
|
||
"{{ slsdotpath }}-screenshot-updated": | ||
pkg.uptodate: | ||
- refresh: True | ||
|
||
"{{ slsdotpath }}-screenshot-installed": | ||
pkg.installed: | ||
- require: | ||
- pkg: "{{ slsdotpath }}-screenshot-updated" | ||
- refresh: True | ||
- install_recommends: False | ||
- skip_suggestions: True | ||
- pkgs: | ||
- zenity | ||
- scrot | ||
|
||
"{{ slsdotpath }}-screenshot-script": | ||
file.managed: | ||
- name: /usr/local/bin/qvm-screenshot | ||
- source: salt://{{ slsdotpath }}/files/bin/qvm-screenshot | ||
- mode: "0755" | ||
- user: root | ||
- group: root | ||
- makedirs: True | ||
- require: | ||
- pkg: "{{ slsdotpath }}-screenshot-installed" | ||
|
||
## TODO: KDE shortcuts | ||
{% set gui_user = salt['cmd.shell']('groupmems -l -g qubes') -%} | ||
{% set gui_user_id = salt['cmd.shell']('id -u ' ~ gui_user) -%} | ||
"{{ slsdotpath }}-screenshot-keyboard-shortcuts-xfce": | ||
cmd.run: | ||
- name: | | ||
DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/{{ gui_user_id }}/bus" | ||
export DBUS_SESSION_BUS_ADDRESS | ||
xfconf-query -c xfce4-keyboard-shortcuts -p "/commands/custom/Print" -n -s "qvm-screenshot --fullscreen" | ||
xfconf-query -c xfce4-keyboard-shortcuts -p "/commands/custom/<Alt>Print" -n -s "qvm-screenshot --region" | ||
- runas: {{ gui_user }} | ||
- require: | ||
- file: "{{ slsdotpath }}-screenshot-script" | ||
|
||
{% endif -%} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{# | ||
SPDX-FileCopyrightText: 2024 Benjamin Grande M. S. <ben.grande.b@gmail.com> | ||
|
||
SPDX-License-Identifier: AGPL-3.0-or-later | ||
#} | ||
|
||
base: | ||
'dom0': | ||
- match: nodegroup | ||
- dom0.screenshot |