Giter Club home page Giter Club logo

gxkb's Introduction

gxkb

Latest release

X11 keyboard layout indicator and switcher

screenshot 1 screenshot 2

Description

gxkb is a tiny indicator applet which allows to quickly switch between different keyboard layouts in X. A flag corresponding to the country of the active layout is shown in the indicator area. The applet is written in C and uses GTK+ library and therefore does not depend on any GNOME components.

Dependencies

  • GTK3
  • libwnck-3
  • libxklavier16
  • libayatana-appindicator3

Installing

Debian and Ubuntu

sudo apt-get install gxkb

Fedora

sudo dnf install gxkb

Building from source

  • Install dependencies

    • Debian

      sudo apt install libwnck-3-dev libxklavier-dev libgtk-3-dev dh-autoreconf dh-make devscripts fakeroot

      For AppIndicator support:

      sudo apt install libayatana-appindicator3-dev
  • Build

    wget https://github.com/zen-tools/gxkb/archive/master.tar.gz -O gxkb.tar.gz
    tar xzf gxkb.tar.gz
    cd gxkb-master
    ./autogen.sh
    ./configure

    For AppIndicator support:

    ./configure --enable-appindicator=yes

    Then:

    make && sudo make install

Usage

  • Show version and features

    gxkb -v
  • Run from a terminal

    gxkb &

Features

  • AppIndicator support

    To switch that off use the following command during building phase:

    ./configure --enable-appindicator=no
  • Custom flags support

    Put your flag images in .local/share/gxkb/flags in PNG format with the names like <country code>.png, e.g. ua.png, pl.png, lt.png and the sizes of 24x24 pixels each

  • Scrolling support

    Switch layouts by scrolling while hovering over the flag

  • Using Scroll Lock led to indicate alternate layouts

    Can be changed in .config/gxkb/gxkb.cfg

Configuration

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

The most interesting options are: layouts=ua,pl,lt 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

Known issues

  • Missing flags:
    Q: gxkb shows a white flag with "?" character instead of the flag of my country.
    A: That means gxkb fails to find an image under /usr/share/gxkb/flags/ directory. If the flag does not belong to the terrorist state, you can create a merge request or issue with proposition to add the flag into distributive. Also, you can override missing/system flags with your own images.

  • Custom flags:
    Q: How can I override the system flags with my own?
    A: You can place your own flags under $XDG_DATA_HOME/gxkb/flags directory. If the XDG_DATA_HOME environment variable is not defined, use $HOME/.local/share/gxkb/flags instead.

  • In Gnome2/Gnome3, Unity, E17, possibly in KDE3/KDE4:
    Q: The layout does not get changed properly while switching between windows.
    A: In your DE settings find keyboard layout control settings, disable the inheriting of the layouts from parent window and disable splitting layouts between windows.

  • In Gnome3/Unity:
    Q: The layout icon is not displayed in system tray area.
    A: Due to different versions of Gnome3 there is no easy answer, Google might help to find the right one. But in fact gxkb works under the hood, so you can use the Gnome3/Unity system indicators for icon displaying, just don't forget to disable the splitting layouts between different windows.

  • In XFCE 4.12:
    Q: The layout icon is not displayed in system tray area.
    A: In "sessions and startup" settings try to find and disable indicator‑application‑service. More details here.

  • In Unity + AppIndicator:
    Q: The layout switching does not work.
    A: It can happen when the system layout switcher indicator‑keyboard uses the same key combination. One possible solution to this may be to assign an unused key combination for indicator‑keyboard. Another solution may be to remove the package indicator‑keyboard, but that will also remove the Unity control center, which will be replaced by a Gnome control center.

gxkb's People

Contributors

debian-janitor avatar mati75 avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

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.