Help: Add a second keymap on E16

Hello, I have installed Elive 64-bit and I want to add a secondary language (english). I want to use english and greek, so i can edit files and stuff for my work. And this is a great system and I want to keep using it. I have donated twice to it

So i went to preferences / settings, configuration languages and keyboard but when i change the keyboard layout to greek, it changes the language greek. I don't know what I am doing wrong or what I am missing. But i want to keep both languages at the same time and not replace it with another.

Can you please help me step-by-step? I would appreciate it a lot.

If it's stuff that's solely needed by i.e LibreOffice, you can set those dictionaries/locales in the preferences there.
System wide you'd have to add the specific aspell and/or hunspell dictionaries to be able to use them for spellchecking and such.

As to changing the keyboard layout: That would depend on which windowmanager your running but I presume E16.

Looking at that old thread, what you need is a keyboard switcher.
If you want you can set your own by having a script called i.e "kbd-switcher.sh" with the following contents: (or download it here)

#! /usr/bin/bash

LayOut=$(setxkbmap -query | awk '/layout/ {print $2}')
if [ $LayOut == "us" ];
then
    setxkbmap -rules evdev -model evdev -layout gr
elif [ $LayOut == "gr" ];
then
     setxkbmap -rules evdev -model evdev -layout us -variant altgr-intl
fi
exit 0

which you can open by double clicking it and letting "Elive Run File Helper" do it's work (you don't need admin privileges) and it should toggle your layout.

If it works you can consider setting that command with a key combo but that could be risky if you use letters ... as they'd change with the layout. :madness:

  • So use symbols that are the same in both layouts.

Maybe this time @TheTechRobo feels like making a clickable GUI version. hint,hint nudge,nudge. :likeaboss:

1 Like

Hehehe, might not do it just out of spite. :madness:

Just kidding, will work on it today. :+1:

Link for progression:

2 Likes

Ooh, that was quick. Well done. :likeaboss:

Haven't tried it yet .... my main gripe is that most stuff has to be started from CML or installed to /usr/bin/* and then still opens a terminal. :frowning_face:
"Livecode" (aka runrev) had that solved multi-platform but alas only older gtk2 libs and I wasn't in the mood to research new stuff.
BTW, What's the "toga" import? -- never mind I'll find out once I'm awake again, tomorrow.

I don't have a gitea account and am a bit apprehensive at having too many git accounts (preffering gitlab ATM) so reacting here.
Shouldn't "desLayout" offer the options here? like using output from:
"/usr/share/X11/xkb/rules/base.lst " as it's hard enough to find out how/what the layouts are called. :thinking:

@Giorgos_Sfyridis as you can see ... it's being worked on. :magick:

It's not done yet ... I just have a skeleton for what it'll say.

Haven't been able to work on it for the past hour and a half because I've been busy my Chromebook has been busy (other people).

yeah, probably. Only thing is, right now I'm working on the GUI.

Contrary to your suggestion, I'm trying "beeware" for the gui...pyside2 has no mobile compatibility which is what I've been wanting for the future.

EDIT Much later: So I've made some basic logic and a basic GUI. I need to revisit some of the logic, but it's coming along nicely. I'm going to take a break.

GUI toolkit for Beeware. Quite simple to implement and offers nicely iOS and Android compatibility ... for the most part. Haven't teste dit yet tho.

Beeware is just a bunch of useful toolkits, like "briefcase" for distribution and "toga" for the GUI toolkit. Works pretty well, considering it's still in development. :thinking:

This is interesting albeit I didn't get it to run yet (it's in the repos tho)

Got it running in the systray with `"gxkb &" command (could add that to startup-applications) but don't see a GUI way to add layouts. :thinking:

Elive_Screenshot_2021-01-13_08:25:55__314x118

Configuration is a bit of a thing here:

Configuration is done via config file: .config/gxkb/gxkb.cfg

The most interesting options are:
layouts=us,ru,ua
toggle_option=grp:alt_shift_toggle,grp_led:scroll,terminate:ctrl_alt_bksp

Instead of grp:alt_shift_toggle you can use whatever the following command gives you: grep grp:.*toggle /usr/share/X11/xkb/rules/base.lst

Conclusion

we "only" need to make a noob friendly GUI configurator for setting keyboard choices for E16 after pulling-in/installing "gxkb"
i.e write to the gxkb.cfg file what lay-out the users chooses when offered the option and then add gxkb to startup-applications, so as to have it in the systray.

Maybe "yad/zenity" is a better option here as GUI. :thinking:

So in short:

  1. Install "gxkb" with:
    "api gxkb"
  2. Edit your configuration with an editor like "nano"
    "nano ~/.config/gxkb/gxkb.cfg"
    and add gr (separate d by a comma) to the file to have a line thus:
    "layouts=us, gr, de" (I added German for clarity)
  • if you want to toggle the lay-out with a key combo like Alt, Shift then, have a toggle_option line thus:
    "toggle_option=grp:alt_shift_toggle,grp_led:scroll"
    and save the file.
  1. Add "gxkb" to startup-applications with:
    "echo "gxkb" >> ~/.e16/startup-applications.list"
    so that it will be added to the systray every time you login to E16

Done. :magick:

Thank you so much for the help. I finally fixed the biggest problem i had

Hmm, I'll try doing that instead. Only thing is, E24 requires you to manually enable the SysTray so they'd be confused as to where it is.

E24 doesn't the need it. There's a builtin keyboard changer that can be put in the dock.
It'll solely be a GUI app to setup gxkb , i.e write to startup-applications.list and gxkb.cfg in E16.
It'll be a nice addition to it. :smiley14:

1 Like