nwg-piotr / nwg-shell-config

nwg-shell configuration utility
MIT License
67 stars 10 forks source link

Not add second keyboard #3

Closed tuxarch closed 2 years ago

tuxarch commented 2 years ago

I can't add a second layout via nwg-shell-config, I added it via variables. That would be another output on the nwg-panel. sway

nwg-piotr commented 2 years ago

Sorry, but I understand nothing. Could you be more specific?

Ah, the input field is too short, right? To enter e.g. us, de?

tuxarch commented 2 years ago

Yes. And if you don't mind, add the ability to display the current layout to nwg-panel. Sorry for google translate.

nwg-piotr commented 2 years ago

No problem.

To see the layout, you may add a simple executor: swaymsg -t get_inputs | jq '.[0].xkb_active_layout_name'.

[edit] use tr to trim quotes:

Save this as e.g. kb-layout:

#!/usr/bin/env bash

swaymsg -t get_inputs | jq '.[0].xkb_active_layout_name' | tr -d '"'

image

tuxarch commented 2 years ago

Thank you. In my case swaymsg -t get_inputs | jq '.[1].xkb_active_layout_name' | tr -d '"'