LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-03-2015, 09:50 AM   #1
kaya
LQ Newbie
 
Registered: Sep 2014
Posts: 23

Rep: Reputation: Disabled
Cool 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!!
 
Old 02-04-2015, 08:36 AM   #2
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
Do you set console layout with loadkeys command?

A web search would definitely help.
 
Old 02-04-2015, 02:29 PM   #3
kaya
LQ Newbie
 
Registered: Sep 2014
Posts: 23

Original Poster
Rep: Reputation: Disabled
xkbcomp $HOME/dvorakhu.xkb

I am using this one.

... And to find something would help much more.
 
Old 02-07-2015, 05:09 AM   #4
kaya
LQ Newbie
 
Registered: Sep 2014
Posts: 23

Original Poster
Rep: Reputation: Disabled
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!
 
  


Reply

Tags
check, layout, script, set


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
set keyboard layout with setxkbmap xeon123 Linux - General 0 02-26-2014 08:44 PM
How set default keyboard layout? george5 Ubuntu 2 07-10-2007 01:54 AM
Set alternative keyboard layout s26c.sayan Arch 1 03-11-2007 05:58 AM
how to set keyboard-layout during initialization? jonaskoelker Debian 8 07-15-2004 05:00 PM
Can somebody check my dvd filesystem layout? Inexactitude Linux - Software 3 03-06-2004 11:44 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:17 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration