The right way to view the current input layout in X

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

The right way to view the current input layout in X

Максим
Hello,
The following command is run from my .xsession file to allow me to switch between english and russian layout:
"setxkbmap -layout "us,ru" -option grp:alt_space_toggle"

But how can I view the current input layout?

-- 
Maksim Rodin

Reply | Threaded
Open this post in threaded view
|

Re: The right way to view the current input layout in X

Robert Klein
On Tue, 28 May 2019 14:50:30 +0300
Максим <[hidden email]> wrote:

> Hello,
> The following command is run from my .xsession file to allow me to
> switch between english and russian layout: "setxkbmap -layout "us,ru"
> -option grp:alt_space_toggle"
>
> But how can I view the current input layout?

“man setxkbmap” says:

[...]
       -query  With this option setxkbmap just prints the current rules,
               model, layout, variant, and options, then exits.
[...]


Best regards
Robert

>
> -- 
> Maksim Rodin
>

Reply | Threaded
Open this post in threaded view
|

Re: The right way to view the current input layout in X

Максим
I saw this option
Not exactly what I want:

"~ $ setxkbmap -query
rules:      base
model:      pc105
layout:     us,ru
options:    grp:alt_space_toggle"

I would like to know whether it is "en" or "ru" right now

-- 
Best Regards
Maksim Rodin


28.05.2019, 15:41, "Robert Klein" <[hidden email]>:

> On Tue, 28 May 2019 14:50:30 +0300
> Максим <[hidden email]> wrote:
>
>>  Hello,
>>  The following command is run from my .xsession file to allow me to
>>  switch between english and russian layout: "setxkbmap -layout "us,ru"
>>  -option grp:alt_space_toggle"
>>
>>  But how can I view the current input layout?
>
> “man setxkbmap” says:
>
> [...]
>        -query With this option setxkbmap just prints the current rules,
>                model, layout, variant, and options, then exits.
> [...]
>
> Best regards
> Robert
>
>>  --
>>  Maksim Rodin

Reply | Threaded
Open this post in threaded view
|

Re: The right way to view the current input layout in X

Lévai, Dániel
In reply to this post by Robert Klein
That's the thing, that doesn't tell you which specific layout is active (from us,ru).

I've been using skb for ages for this: https://plhk.ru/

It does the job.


Dani

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Tuesday, 28 May 2019 14:39, Robert Klein <[hidden email]> wrote:

> On Tue, 28 May 2019 14:50:30 +0300
> Максим [hidden email] wrote:
>
> > Hello,
> > The following command is run from my .xsession file to allow me to
> > switch between english and russian layout: "setxkbmap -layout "us,ru"
> > -option grp:alt_space_toggle"
> > But how can I view the current input layout?
>
> “man setxkbmap” says:
>
> [...]
> -query With this option setxkbmap just prints the current rules,
> model, layout, variant, and options, then exits.
> [...]
>
> Best regards
> Robert
>
> > -- 
> > Maksim Rodin


publickey - leva@ecentrum.hu - 0x66E1F716.asc (900 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: The right way to view the current input layout in X

Jan Stary
In reply to this post by Максим
On May 28 15:45:30, [hidden email] wrote:

> I saw this option
> Not exactly what I want:
>
> "~ $ setxkbmap -query
> rules:      base
> model:      pc105
> layout:     us,ru
> options:    grp:alt_space_toggle"
>
> I would like to know whether it is "en" or "ru" right now

setxkbmap -layout "us,cz" -option "grp:shifts_toggle,grp_led:scroll"

also switches the scroll lock led on/off to indicate that.

Reply | Threaded
Open this post in threaded view
|

Re: The right way to view the current input layout in X

Zeljko Jovanovic
In reply to this post by Максим
On 28.05.2019. 14:45, Максим wrote:

> I saw this option
> Not exactly what I want:
>
> "~ $ setxkbmap -query
> rules:      base
> model:      pc105
> layout:     us,ru
> options:    grp:alt_space_toggle"
>
> I would like to know whether it is "en" or "ru" right now
>
> --
> Best Regards
> Maksim Rodin

Hi Maksim,

I use the following command to enable switching with Alt-Shift between English
US, Serbian Latin and Serbian Cyrillic layouts:

setxkbmap -option grp:switch,grp:alt_shift_toggle,grp_led:scroll us,rs,rs ,latin,


When keyboard layout is the first one specified (English US), Scroll Lock LED on
keyboard is turned on, otherwise it is off. That's allow me to switch layouts
fast, without looking at the screen.

Hope this helps.

Zeljko

Reply | Threaded
Open this post in threaded view
|

Re: The right way to view the current input layout in X

Максим
In reply to this post by Lévai, Dániel
Thank you.
It really does the job.

-- 
Best Regards
Maksim Rodin

28.05.2019, 16:24, "Lévai, Dániel" <[hidden email]>:

> That's the thing, that doesn't tell you which specific layout is active (from us,ru).
>
> I've been using skb for ages for this: https://plhk.ru/
>
> It does the job.
>
> Dani
>
> ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
> On Tuesday, 28 May 2019 14:39, Robert Klein <[hidden email]> wrote:
>
>>  On Tue, 28 May 2019 14:50:30 +0300
>>  Максим [hidden email] wrote:
>>
>>  > Hello,
>>  > The following command is run from my .xsession file to allow me to
>>  > switch between english and russian layout: "setxkbmap -layout "us,ru"
>>  > -option grp:alt_space_toggle"
>>  > But how can I view the current input layout?
>>
>>  “man setxkbmap” says:
>>
>>  [...]
>>  -query With this option setxkbmap just prints the current rules,
>>  model, layout, variant, and options, then exits.
>>  [...]
>>
>>  Best regards
>>  Robert
>>
>>  > --
>>  > Maksim Rodin