Open globetrotterdk opened 2 years ago
Usually, if you configure two keyboard layouts at the NomadBSD setup, such an applet will start automatically on session start. You can proceed as follows if you haven't configured a second keyboard layout yet:
~/.config/xkbdmap.sh
by adding the linesetxkbdmap -layout us,dk
gxkb
[1] start on session start via a new entry in dsbautostart
.You can switch between layouts by clicking on the flag symbol in Tint.
1. If not installed, install x11/gxkb
My use case scenario is two keyboards, three keyboard layouts. I have tried gxkb, however it only shows one keyboard layout - a question mark in Tint2 and nothing in Plank. It is also impossible to move the icons around in Plank. I have also tried editing the ~/.config/plank.ini file directly, but to no effect. Here is my ~/.config/xkbdmap.sh:
setxkbdmap -layout dk,us,ru
At install, I have tried configuring two keyboard layouts - default Danish and secondary US English, however the Danish keyboard was always dominated by the US English (a bit like real life linguistics on occasion) and I could never get the Danish keyboard to work, so I stopped configuring the US English as a secondary keyboard, but there is definitely something going on...
a question mark in Tint2 and nothing in Plank.
Plank, unlike Tint2, does not have a tray where gxkb
can run in.
At install, I have tried configuring two keyboard layouts - default Danish and secondary US English, however the Danish keyboard was always dominated by the US English (a bit like real life linguistics on occasion) and I could never get the Danish keyboard to work, so I stopped configuring the US English as a secondary keyboard, but there is definitely something going on...
An alternative is IBus. You can configure it as follows:
EDIT:
$ sudo pkg install ibus
Add the lines
export GTK_IM_MODULE=ibus
export QT_IM_MODULE=ibus
export XMODIFIERS=@im=ibus
export XIM_PROGRAM="ibus-daemon"
export XIM_ARGS="--daemonize --xim"
ibus-daemon&
to ~/.xprofile
near the beginning of the file, where the other export
s are.
The default tray icon color (dark blue) is hard to read. Change it to white:
$ dconf write /desktop/ibus/panel/xkb-icon-rgba "'white'"
After logging out and in again, you'll see IBus's tray icon in Tint2. Right-click on it to open the context menu. Go to Settings->Input Method to add layouts. Left-click on the tray icon to select from your layouts.
A simple applet for switching between keyboard layouts would be very useful in NomadBSD. I am aware of vladas response to my post in the forum, however for a user friendly desktop, I believe that something along the lines of XFCE's xfce4-xkb-plugin would be much more user friendly, frankly than vladas solution. I have tried installing xfce4-xkb-plugin directly, but haven't found a way of getting it to appear in Tint2 at login.