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