remaps improvements
This commit is contained in:
parent
9ebeb43013
commit
2f05a92a22
1 changed files with 9 additions and 4 deletions
|
@ -16,7 +16,7 @@ rotate() {
|
||||||
}
|
}
|
||||||
|
|
||||||
setmap() {
|
setmap() {
|
||||||
current="$(readlink keymap)"
|
current=${1:-$(readlink keymap)}
|
||||||
xkbcomp "$current" "$DISPLAY" >/dev/null 2>&1 || return 1
|
xkbcomp "$current" "$DISPLAY" >/dev/null 2>&1 || return 1
|
||||||
xset r rate 300 50
|
xset r rate 300 50
|
||||||
xset -q | grep -q "Caps Lock:\s*on" && xdotool key Caps_Lock
|
xset -q | grep -q "Caps Lock:\s*on" && xdotool key Caps_Lock
|
||||||
|
@ -28,12 +28,17 @@ setmap() {
|
||||||
|
|
||||||
cd "$MAP_DIR" || return 1
|
cd "$MAP_DIR" || return 1
|
||||||
notifier="notify-send"
|
notifier="notify-send"
|
||||||
while getopts dqQ flag; do
|
|
||||||
case "$flag" in
|
while
|
||||||
|
case "$1" in
|
||||||
q) notifier=":" ;;
|
q) notifier=":" ;;
|
||||||
d) setmap; return ;;
|
d) setmap; return ;;
|
||||||
|
s) setmap "$2"; return ;;
|
||||||
|
l) ls "$MAP_DIR" | grep -i keymap ;;
|
||||||
*) ;;
|
*) ;;
|
||||||
esac
|
esac
|
||||||
done
|
shift
|
||||||
|
do :; done
|
||||||
|
|
||||||
rotate
|
rotate
|
||||||
setmap
|
setmap
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue