arch/pkg/de-p1st-xfce4/xfce4-keyboard-shortcuts.xml.holoscript
2021-07-02 12:51:26 +02:00

14 lines
579 B
Bash

#!/bin/sh
# stdin: default config
# stdout: modified config
set -e
# 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"
echo "$stdin" | 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;"/>|'