xfce4: change "Print" shortcut

This commit is contained in:
Daniel Langbein 2021-07-02 11:03:09 +02:00
parent dd3a64de87
commit b0c00db60a
3 changed files with 20 additions and 3 deletions

View File

@ -2,7 +2,7 @@
_pkgname=xfce4
_reponame=arch
pkgname="de-p1st-$_pkgname"
pkgver=0.0.25
pkgver=0.0.26
pkgrel=1
pkgdesc="XFCE4 with configuration"
arch=('any')
@ -99,6 +99,9 @@ package() {
mkdir -p "$pkgdir"/etc/skel/
cp -ra config "$pkgdir"/etc/skel/.config
# === shortcuts ===
install -Dm0544 xfce4-keyboard-shortcuts.xml.holoscript "$pkgdir"/usr/share/holo/files/"$pkgname"/etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml.holoscript
# === display manager ===
install -Dm0644 systemd.preset "$pkgdir"/usr/lib/systemd/system-preset/20-"$pkgname".preset
install -Dm0644 p1st-settings.conf "$pkgdir"/etc/sddm.conf.d/p1st-settings.conf

View File

@ -15,3 +15,5 @@ Panel2:
Thunar:
-> hidden files visible
-> filders not before files
TODO: keyboard shortcut "Print" -> save .png in Pictures folder

View File

@ -0,0 +1,12 @@
#!/bin/sh
# stdin: default config
# stdout: modified config
# save stdin (content of /etc/mkinitcpio.conf) in variable
stdin=$(cat)
# assert a screenshot for key-combination "Print" exists
echo "$stdin" | grep --quiet '^\s*<property name="Print" type="string" value="xfce4-screenshooter"/>\s*$'
# replace action key-combination "Print"
sed 's|<property name="Print" type="string" value="xfce4-screenshooter"/>|<property name="Print" type="string" value="sh -c &apos;xfce4-screenshooter -f -s &quot;Pictures/$(date +%Y%m%d_%H%M%S).png&quot;&apos;"/>|' <<< "$stdin"