Last active
September 29, 2015 19:58
-
-
Save v6ak/1658604 to your computer and use it in GitHub Desktop.
Nastaví klávesnici cz qwerty a pro AltGr+ů nastaví dolar místo středníku - stejně jako na cz qwertz
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
#!/bin/bash | |
## | |
## DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
## Version 2, December 2004 | |
## | |
## Copyright (C) 2012 Vít Šesták 'v6ak' <https://contact.v6ak.com/> | |
## | |
## Everyone is permitted to copy and distribute verbatim or modified | |
## copies of this license document, and changing it is allowed as long | |
## as the name is changed. | |
## | |
## DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
## TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION | |
## | |
## 0. You just DO WHAT THE FUCK YOU WANT TO. | |
# | |
## | |
## Script is inspired by http://madduck.net/docs/extending-xkb/ | |
## | |
# set keyboard | |
setxkbmap cz qwerty | |
# modify | |
dumpfile="$(mktemp)" | |
xkbcomp "$DISPLAY" "$dumpfile" | |
PATTERN='symbols\[Group1\]= \[ uring, quotedbl, semicolon, colon \]' | |
REPLACEMENT='symbols[Group1]= [ uring, quotedbl, dollar, colon ]' | |
sed -i "s#$PATTERN#$REPLACEMENT#" "$dumpfile" | |
# set modified keyboard | |
xkbcomp "$dumpfile" "$DISPLAY" | |
# clean | |
rm "$dumpfile" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Heh, přesně tohle jsem vždycky potřeboval.