Skip to content

Instantly share code, notes, and snippets.

@v6ak
Last active September 29, 2015 19:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save v6ak/1658604 to your computer and use it in GitHub Desktop.
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
#!/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"
@garretraziel
Copy link

Heh, přesně tohle jsem vždycky potřeboval.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment