We have moved to a new Sailfish OS Forum. Please start new discussions there.
0

[Question] How I can see the list of available keyboards in CLI ?

asked 2015-07-18 02:01:29 +0200

Schturman gravatar image

Hi
Can someone tell me what the command to see the list of available keyboards like we see them in: Settings->System->Text Input->Keyboards.
Thanks

edit retag flag offensive close delete

2 Answers

Sort by » oldest newest most voted
0

answered 2015-07-18 15:46:44 +0200

tokaru gravatar image

Do you mean cat /usr/share/maliit/plugins/com/jolla/layouts/*.conf ?

edit flag offensive delete publish link more

Comments

thanks, but this not really what I meant... I want to see available keywords like we see them in Settings->System->Text Input->Keyboards.
I mean only names and in the same order... If this possible at all..

Schturman ( 2015-07-18 16:06:30 +0200 )edit

It's surely possible to extract and sort with some command line fu, but maybe there is an easier / another way to get the exact list.

tokaru ( 2015-07-18 16:15:32 +0200 )edit

for example I use this command:
cat /usr/share/maliit/plugins/com/jolla/layouts/.conf|grep "name="|cut -d '=' -f2|sort
But it still not the same order...

Schturman ( 2015-07-18 16:16:52 +0200 )edit

Ah, okay. The entries seem to be sorted simply alphanumerically on my phone (your command also returns the list in the same order), but maybe that's rather a coincidence.

tokaru ( 2015-07-18 16:22:44 +0200 )edit

yes it should be in alphabetical order.. And almost the same.. but in the setting after Turkce came Kazak, Русский, עברית and some Chinese... In the output of this command it chenged to thos order:
Türkçe
עברית
עברית
Қазақ
Русский
Русский2
中文(手写简)
中文(手寫繁)
中文(拼音)
中文(笔画)

Schturman ( 2015-07-18 16:47:37 +0200 )edit
0

answered 2015-10-30 11:42:25 +0200

Schturman gravatar image

Ok, I fixed it with this commands in the spec file:
numen=$(cat /usr/share/maliit/plugins/com/jolla/layouts/.conf|grep "name="|cut -d '=' -f2|sort|grep -n "אנגלית"|cut -d ':' -f1)
numhe=$(cat /usr/share/maliit/plugins/com/jolla/layouts/
.conf|grep "name="|cut -d '=' -f2|sort|grep -n "עברית"|cut -d ':' -f1)
numru=$(cat /usr/share/maliit/plugins/com/jolla/layouts/.conf|grep "name="|cut -d '=' -f2|sort|grep -n "רוסית"|cut -d ':' -f1)

sed -i -e "s/switchLayout(
.);/switchLayout("$[$numru-1]");/g" /usr/share/maliit/plugins/com/jolla/layouts/en2.qml
sed -i -e "s/switchLayout(
.);/switchLayout("$[$numen-1]");/g" /usr/share/maliit/plugins/com/jolla/layouts/he2.qml
sed -i -e "s/switchLayout(
.*);/switchLayout("$[$numhe-1]");/g" /usr/share/maliit/plugins/com/jolla/layouts/ru2.qml


And switcher working correctly right after installation :D

edit flag offensive delete publish link more
Login/Signup to Answer

Question tools

Follow
1 follower

Stats

Asked: 2015-07-18 02:01:29 +0200

Seen: 283 times

Last updated: Oct 30 '15