Coder Social home page Coder Social logo

zen-tools / gxkb Goto Github PK

View Code? Open in Web Editor NEW
134.0 134.0 11.0 1.02 MB

🇺🇦 🇵🇱 🇱🇹 🇪🇪 X11 keyboard indicator and switcher

Home Page: https://zen-tools.github.io/gxkb

Shell 0.79% C 90.68% Makefile 5.59% M4 2.94%
gtk3 x-keyboard-layout x11

gxkb's Introduction

SWUbanner

gxkb's People

Contributors

jakubfabijan avatar konlaasz avatar mati75 avatar michael-on-github avatar nazar-pc avatar tim77 avatar zen-tools avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gxkb's Issues

Flag doesn´t show when using alternative layout.

When using

setxkbmap -model pc105 -layout us,cz_qwerty -option grp:alt_shift_toggle

question mark is shown.

Screenshot_2021-05-03_14-06-35

When using

setxkbmap -model pc105 -layout us,cz -option grp:alt_shift_toggle

Screenshot_2021-05-03_14-37-43

flag is shown correctly.

Ubuntu doesn't need a ppa

At least in Ubuntu 16.10/17.04 gxkb is present in default repositories, so there is no need to add ppa.
Maybe correct readme to reflect this fact?

Disable tray applet

Hi!

How I can disable indicator in system tray? Program works good, but I don't need tray indicator.

With the latest update missing language flag in Unity panel display

Hello! I use Ubuntu 16.04.1 x64 with Unity as the desktop manager. After missing the last update the display of flags in the panel running programs. The program starts and runs in the background, but the lack of indication does not make the work more comfortable. I hope this is a bug, not a purposeful innovation.

Strange behavior

Every time I run gxkb it defaults to the profiles: es, us. I entered gxkb.cfg and added the profile: latam at the beginning. Sometimes it starts recognizing said profile, sometimes, by restarting the application (up to three times) it recognizes it. But, the strangest thing happens after an indeterminate amount of time, when it only recognizes the first two profiles mentioned. I return to the .cfg file and everything is correct, just like the last time.

My question is this: how can I make it recognize the configuration, where, the profile: latam; Always be the first option and not to change profiles as it apparently pleases?

By the way:
OS: Xubuntu 20.04; icewm.

Thanks in advance!

Gxkb stops working after notebook awakes from the sleep mode

Hello,

I have the following issue. I have a config with two layouts: us and ru. All works fine untill notebook goes to sleep mode. When it awakes - there is only one layout in gxkb - us. If I close gxkb, then config becomes to:

[xkb config]
group_policy=2
default_group=0
never_modify_config=false
model=pc105
layouts=us
variants=
toggle_option=
compose_key_position=

There is one more strange thing: I get able to change the layout between ru and us when I close gxkb after this o_O

Is there anyway to solve this issue?

My config:

[xkb config]
group_policy=2
default_group=0
never_modify_config=false
model=pc105
layouts=us,ru
variants=,
toggle_option=grp:ctrl_shift_toggle,grp_led:scroll,terminate:ctrl_alt_bksp
compose_key_position=

System: Ubuntu 16.04 x64. I have only one keyboard layout in the ubuntu text entry settings without hotkey to change layout and "Use the same source for all windows" option activated. There are no any setxkbmap commands in startup or somewhere else...
Gxkb: 0.7.7

Thank you in advance.

Autoswitch layout?

Can make autoswitch layouts for application if it starting?
It made in xxkb.

What are the options for?

group_policy=2
default_group=0
never_modify_config=false
variants=
compose_key_position=

Missing many flags

Flags for many countries/layouts are missing. Personally, I'm looking for IL, but many more are missing.

gxkb rewrites xmodmap mappings

Hi everybody,

First, let me thank you for this tray indicator, I've been using it for awhile and it worked great. Here's, however, a small issue I've encountered.

Reproduce:

  1. Run xmodmap -e "keycode 117 = Prior" -e "keycode 112 = Next" to swap PageUp and PageDown
  2. Run gxkb and that will restore the mappings to the default

The program loses layouts "ru"

Hi, dear Zen. Big thanks for you program gxkb!
I like very much to use it.

But there is one thing: The program loses layouts "ru" for reasons unknown to me.
Disappears approximately 1 time per hour.
I do not do anything unusual. I communicate in skype. I'm watching YouTube. I'm working with virtual machines in virtualbox.
And suddenly I lose the opportunity to enter the text in Russian.
The layouts of "us" remains one, and "ru" disappears.
I look at the config right away - there are both layouts.
But if you shut down the program, then only "us" remains in the config file.
If you configure the config and run the program, then everything is fine.
I tried to do "never_modify_config = true", then restarting the program did not help.
I tried to do "layouts = ru, us", but still "ru" disappears.
Please, tell me how to use your program in comfort? Or is it not a bug, but a feature ?!

I am used Ubuntu 16.04.5 LTS.
Kernel is 4.15.0-34-generic.
DE - Unity.

Spanish accents are backwards

When I switch to the Spanish keyboard layout, my accents show up as à è ì ò ù, when in reality it should be á é í ó ú. Is this a problem with gxkb or something else? I'm running Mint 19.2, with i3 as my WM.

gxkb hungs

Gxkb hungs when trying to switch layouts under heavy load and at the same time begins to heavily load the processor itself. This does not always happen in such conditions. I was deleting settings in ~/.config and ~/.local but it did not help. It never happened before. I temporarily returned to fbxkb

In Russian.
Gxkb зависает при попытке переключения раскладки, когда компьютер сильно загружен, и после зависания сам начинает сильно грузить процессор. Так бывает не всегда в таких условиях. Я удалял настройки в ~ / .config и ~ / .local, но это не помогло. Раньше такого не было. Я временно(надеюсь) вернулся на fbxkb.

Switching layout variant

The layout switch seems to work fine but even tho there are two variants in the config file, I don't seem to be able to switch between them (while it also seems that all the variants must be available for each layout).
What seems to happen is that for my two layouts (gb,fr), the two variants I have (extd,dvorak) it seems that what I get is gb-extd and dvorak-fr (meanwhile having a third variant that only exist for one layout throws off gxkb).

Edit:
I think I figured out the issue (or at least the gap in the docs): layouts can be repeated (e.g. gb,gb,fr) as long as the variant at the corresponding index in the list is available for that layout (e.g. layout[0] will use variant[0], layout[1] will use variant[1], ... layout[n] will use variant[n]); there's no permutation (which is what I initially thought).

Side note: I'm not sure if it's an AwesomeWM remapping problem or laptop or gxkb but it seems that switching layouts can fuck with the WM's keybindings.

`xdotool key Control+v` with ru layout cause infinite layout switching loop

xdotool version 3.20160805.1
gxkb version 0.8.1

/etc/X11/xorg.conf.d/00-keyboard.conf

# Written by systemd-localed(8), read by systemd-localed and Xorg. It's
# probably wise not to edit this file manually. Use localectl(1) to
# instruct systemd-localed to update it.
Section "InputClass"
        Identifier "system-keyboard"
        MatchIsKeyboard "on"
        Option "XkbLayout" "us,ru"
        Option "XkbModel" "pc104"
        Option "XkbOptions" "grp:shifts_toggle"
EndSection

Steps to reproduce:

  1. Switch to ru layout
  2. Run xdotool key --clearmodifiers Control+v

Without gxkb running xdotool switches layout to us then back to ru only once.

Gxkb indicator not switching layout in some cases

Gxkb Version: 0.8.2 and 0.9.0 current master branch, both with appindicator support
System: Arch Linux, Debian Sid
DE: MATE Desktop.
Steps to reproduce (Use MATE Desktop)

  1. Open gxkb via terminal, and minimize window
  2. Open file manager and browser. Change layout by hotkey in browser window, then change it in filemanager window
  3. Close file manager and browser
  4. Try to change layout by hotkey. Indicator doesn't changing anything
    If click to desktop once, gxkb is start to working again
    Maximize terminal window and see this
    [1604572590,000,xklavier_evt_xkb.c:xkl_xkb_process_x_event/] ATTENTION! Currently cached group 1 is not equal to the current group from the event: 2
    ![1604572590,000,xklavier_evt_xkb.c:xkl_xkb_process_x_event/] ATTENTION! Currently cached group 1 is not equal to the current group from the event: 2
    ![1604572590,000,xklavier_evt_xkb.c:xkl_xkb_process_x_event/] ATTENTION! Currently cached group 1 is not equal to the current group from the event: 0
    ![1604572590,000,xklavier_evt_xkb.c:xkl_xkb_process_x_event/] ATTENTION! Currently cached group 1 is not equal to the current group from the event: 0
    ![1604572591,000,xklavier_evt_xkb.c:xkl_xkb_process_x_event/] ATTENTION! Currently cached group 1 is not equal to the current group from the event: 2
    ![1604572591,000,xklavier_evt_xkb.c:xkl_xkb_process_x_event/] ATTENTION! Currently cached group 1 is not equal to the current group from the event: 2

Missed flag for cz_qwerty layout

I use following layouts:

us,cz_qwerty,ua(unicode)

When the cz_qwerty layout is active I see a questin mark instead of flag:

cz_qwerty

To fix it I just create a symlink cz_qwerty.png → cz.png

sudo ln -s /usr/share/gxkb/flags/cz.png /usr/share/gxkb/flags/cz_qwerty.png

cz_qwerty_fixed

[REQUEST] OF THE YEAR!!!

Add an option to restore numlock state! I'd gladly do it myself if I had a clue about GTK or programming in general!

Thanks

Спасибо за единственный нормальный переключатель раскладок

Amount of layouts?

Hi Zen. Thanks for your work!

Can only three layouts be used at one time? I was trying to add more than three, but it doesn't seem to work.

Thank you!

Adding missing flag icon for language variant

Hello,
I'm trying to add to ~/.local/share/gxkb/flags a flag which is missing for my language. Ruthenian is different language than serbian, but technically in gxkb is done that it is implemented as part of serbian keyboard variant.

gkbd-keyboard-display -l "rs(rue)"
This command will give me keyboard layout for my language. No idea though how to add missing flag in gxkb system tray indicator applet.

I tried adding rs(rue).png, rs-rue.png to the ~/.local/share/gxkb/flags but no success.

Any help is appreciated.

Thanks, Tom

Few times per day config can wipes out

Hi
Thanks for small useful tool!
I have Ubuntu 16.04 (Unity). My config:

[xkb config]
group_policy=2
default_group=0
never_modify_config=false
model=pc105
layouts=us,ru
variants=,
toggle_option=grp:shift_caps_switch,grp_led:scroll,terminate:ctrl_alt_bksp
compose_key_position=

Few times per day my config for some unknown reason changing on default. I'm not sure that it's gxkb issue (maybe it's unity). But I think gxkb should try to save it's config :)

Icewm systray

The popup indicator (showing current layout or providing a menu on right-click) in Icewm taskbar system tray popups towards the bottom (where it can't be seen). I can only see it if I place the taskbar on top. Can this be fixed?
Thanks for a great application!

Switch language by itself--feature or bug?

Installed on Debian Stretch (gxkb (0.7.8-1)), the programme switches by itself from one language to the next as soon as a new window is opened. That enables different windows opened at the same time, each using a different keycode. Is it possible to stop this behaviour?
My gxkb.cfg:

[xkb config]
group_policy=2
default_group=0
never_modify_config=false
model=pc105
layouts=it,de
variants=
toggle_option=
compose_key_position=

icon not loaded in system tray

just built and installed gxkb-0.8.2
when i start gxkb from a terminal, it does not load an icon into the system tray.
I am using Linux Debian (Linux trifid 4.19.0-9-amd64 #1 SMP Debian 4.19.118-2+deb10u1 (2020-06-07) x86_64 GNU/Linux)
and KDE / Plasma 5 / xfce4.
ps shows it is running,but nothing seems to happen.

cli or signals

This is a feature request. It would be awesome if there was some way to use gxkb other than clicking or scrolling on the applet. What I have in mind are either signals sent to the applet to either switch to the next layout or open the menu, or a cli option to do just that. Or implement a dbus interface. Either way it would allow external tools to interact with gxkb and you could for example to a keybind that reproduces the layout switcher on windows.

Broken compatibility for appindicator package name

From begining gxkb used "appindicator" with pkg-config and "libappindicator" in includes to use unity appindicator.
But then I see some debian patch, which is simply replacement for "appindicator" with "ayatana-indicator" everywhere. However, official sources seem still keeping original naming. I made it to build with that appindicator with this command before autogen:

{	find . -name '*.[ch]'
	echo configure.ac
} | xargs sed -i 's|ayatana-appindicator|appindicator|'

In particular, unmodified appindicator is used in gentoo. So, although sometimes they tell gentoo is strange, looks like this time it's debian broke something.

Although bug reports are usually expected to explain desired result - I see it's hard to tell, which naming way is preferable due to such divergence.

Text instead of flags

Would it be difficult to add an option to show text like US instead of flags?
It would fit monochrome themes much better.

[Wishlist] Port to GTK3

Debian want to remove gtk2 applications. In this case I created this issue and my simple patch in pull (#28).

Patch is working but with a few issues, in my test in lxqt left mouse click menu is not displayed.

Layout switching stops working when connecting bluetooth headphones.

Not sure if it's related to gxkb or xorg. When bluetooth headphones are connected, layout switching stops working altogether.
My configuration is as follows:

group_policy=2
default_group=0
never_modify_config=false
model=pc105
layouts=us,mn
variants=
toggle_option=grp:caps_toggle,grp_led:caps
compose_key_position=

Debian 12, awesomeWM, gxkb v0.9.3, installed from Debian repositories.
My xorg.d folder contains this configuration:

Section "InputClass"
        Identifier "libinput touchpad catchall"
        MatchIsTouchpad "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
        Option "Tapping" "on"
EndSection

But I suppose this is not related.
I suspect that media control buttons present on the bluetooth headphones are recognized by the xorg(or any other part of the system) as a separate input device and it reconfigures layouts disregarding gxkb's config. Any workarounds? Please feel free to close this issue if it's unrelated to gxkb.
UPD fixed formatting

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.