Posts: 75
M_Mynaardt
Joined: 11 Jul 2011
#1
Hi, All.

Just wondering if there are two things available for the antiX task bar over all the DEs:
1. a graphic battery monitor to give you some idea of how much charge is left
(mostly because Conky only shows on desktop one with IceWM)
2. a keyboard changer (I like using the Spanish or Polytonic Greek keyboard sometimes)

Thanks in advance!
Last edited by M_Mynaardt on 14 May 2017, 15:00, edited 1 time in total.
Posts: 1,445
skidoo
Joined: 09 Feb 2012
#2
for info on battery monitor in tray apps, read these:
batti-gtk-solved-t4662-15.html
image-level-battery-t6615.html
(I've never tested whether each given app works in"all" icwm/JWM/fluxbox)

a keyboard changer:
~/.desktop-session/startup
Preinstalled in your antiX session startup file, you should have lines which read:
#Puts a flag on the taskbar to show which keyboard is being used
#fbxkb

^--- remove the hash symbol & save the edited file. Now each time you start a new desktop session, fbxkb should autostart & show up in the tray
Posts: 75
M_Mynaardt
Joined: 11 Jul 2011
#3
Hello, again, skidoo!
Most of the way there, with just a couple of minor aesthetic problems.

For the battery monitor bit, I couldn't quite figure out how to make sense of those examples.
But they did make me think to look in Synaptic (which I should've tried before).
I found one that works: fdpowermon.
It's very simple, but shows up nicely in the IceWM, Fluxbox and JWM task bars.

So far so good.

I mostly got the keyboard switcher working too.
I made the recommended change in ~/.desktop-session/startup
But I had to dig a bit via google to find out how to set fbxkb for multiple keyboards.
Took a while, but I finally figured out that if you want variant keyboards (like I do), you need to put all the keyboard codes in single quotes.
I finally got it right using this:

Code: Select all

setxkbmap -option grp:switch,grp:shifts_toggle,grp_led:scroll 'ca(eng),es,epo,gr(polytonic)'
There are only two minor (aesthetic) problems, though:
1. If I switch to either Fluxbox or JWM, the keyboard icon shows up twice on the task bar. It doesn't do this in IceWM, though.
2. that setxkbmap command is supposed to allow you to toggle through keyboards using both shift keys.
But that doesn't happen. A left-click from the mouse still works.

Anyway, I have got most of what I was looking for.

But if I can fix the fbxkb double icons in Fluxbox and JWM, as well as the double shift-key thing, that would be icing on the cake!

Thanks again!
Posts: 1,445
skidoo
Joined: 09 Feb 2012
#4
The"multiple instances" probably can be resolved by adding 2 lines
killall fbxkb &
sleep 2 &

immediately before the newly-added fbxkb & line in the startup file.

Hopefully someone else reading this can provide insight regarding the unexpected setxkbmap behavior.
Posts: 75
M_Mynaardt
Joined: 11 Jul 2011
#5
Hello yet again, Skidoo:

I did try what you suggested in ~/.desktop-session/startup to have this code (without comments):

Code: Select all

killall fbxkb &
sleep 2 &
fbxkb &
setxkbmap -option grp:switch,grp:shifts_toggle,grp_led:scroll 'ca(eng),es,epo,gr(polytonic)' &
Unfortunately, that didn't work. The fbxkb icon showed up in IceWM, but not in either Fluxbox nor JWM.

However, I had a thought! __{{emoticon}}__
when I regained consciousness __{{emoticon}}__

Seriously, though, it occurred to me that maybe I should put the setxkbmap command before the fbxkb command.
So, I tried that, without the killall and sleep commands above.

And … voilà! … it worked! __{{emoticon}}__
No more duplicates of the keyboard icon. __{{emoticon}}__

Of course, I don't know why the order makes a difference.
But it did occur to me that the sequence of commands often does make a difference in computers.

Anyway, I changed the keyboard commands in ~/.desktop-session/startup to this (including comments this time):

Code: Select all

# Sets the keyboard convfiguration to what I like:
# Canada (English), Spanish, Esperanto and Polytonic Greek
setxkbmap -option grp:switch,grp:shifts_toggle,grp_led:scroll 'ca(eng),es,epo,gr(polytonic)' &

# Puts a flag on the taskbar to show which keyboard is being used.
fbxkb &

# NOTE:  Put setxkbmap before fbxkb
# otherwise, there are multiples of the keyboard icon in both Fluxbox and JWM
Anyway, thanks for the responses.
I probably wouldn't have thought to try what I did to make it work.

And I thought I'd just post it here, in case someone else wants multiple keyboards on their own task bars.

Thanks again!
Last edited by M_Mynaardt on 14 May 2017, 17:27, edited 1 time in total.
Posts: 1,445
skidoo
Joined: 09 Feb 2012
#6
Thanks for reporting the solution. The info will be helpful for anyone else searching the forum.
Posts: 75
M_Mynaardt
Joined: 11 Jul 2011
#7
No problem.
Always glad to do my bit.
Posts: 16
gelosoil
Joined: 19 Feb 2017
#8
Fantastic job!!I ve been looking for a solution sometime now!
I couldnt get the language switching working ,and this solved it!..(I could only change input language through the CC-Session-Keyboard option ,which was really inconvenient.. __{{emoticon}}__ :)Thank you !!