How can I check in script that what layout is set?
How can I check in script that what layout is set?
I want to check it in every second because after sleep it doesnt set back to my custom layout. I hope that when I use that japanese mozc writing engine than it will leave it. Best would be to ask in the script that if I push altgr + a then will it be "á" or not. So if it will not be than I can just run my custom layout set program. I was tried to run that on every wake up event, but that wasnt affected on the user environment (aka X). And when I tried to run it on the X host than the X was always frozen. So I want to check it every second... How? Thank you!! |
Do you set console layout with loadkeys command?
A web search would definitely help. |
xkbcomp $HOME/dvorakhu.xkb
I am using this one. ... And to find something would help much more. |
Ok, I have made it.
Here: #!/bin/bash # # Autobill # GPLv3 while true; do VAJON=`xmodmap -pke | grep aacute >/dev/null && echo 1 || echo 0` if [ $VAJON -eq 0 ] then bill 2>/dev/null fi sleep 2; done If you do know a nicer way, I am interested. This one is a weird solution. But it works! |
All times are GMT -5. The time now is 10:48 AM. |