mirror of
https://codeberg.org/privacy1st/arch
synced 2024-12-24 01:16:05 +01:00
13 lines
567 B
Plaintext
13 lines
567 B
Plaintext
|
#!/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 'xfce4-screenshooter -f -s "Pictures/$(date +%Y%m%d_%H%M%S).png"'"/>|' <<< "$stdin"
|