dotfiles/dot_bin/executable_xprintlayout

21 lines
367 B
Plaintext
Raw Permalink Normal View History

2021-02-15 20:53:16 -05:00
#!/bin/bash
# exports the current keyboard layout as a pdf
# the sole argument is the path of the output file
# requires:
# - xorg-setxkbmap
# - xorg-setxkbcomp
# - xorg-xkbprint
# - ghostscript
if [ -z "$1" ]; then
echo no output file path given
exit 1
fi
setxkbmap -print |
xkbcomp - - |
xkbprint -label symbols -color - - |
ps2pdf - > "$1"