All Projects → lyokha → g3kb-switch

lyokha / g3kb-switch

Licence: other
CLI keyboard layout switcher for Gnome Shell

Programming Languages

c
50402 projects - #5 most used programming language
javascript
184084 projects - #8 most used programming language
CMake
9771 projects
shell
77523 projects
Makefile
30231 projects

Projects that are alternatives of or similar to g3kb-switch

Adementary Theme
A theme for GNOME/Budgie/Xfce/Cinnamon desktop with elementary-ish aesthetics.
Stars: ✭ 129 (+239.47%)
Mutual labels:  gnome, gnome-shell
Gnome Shell Extension Cast To Tv
Cast files to Chromecast, web browser or media player app over local network.
Stars: ✭ 200 (+426.32%)
Mutual labels:  gnome, gnome-shell
Gnome Shell Extension Gsconnect
KDE Connect implementation for GNOME
Stars: ✭ 2,137 (+5523.68%)
Mutual labels:  gnome, gnome-shell
Arc Theme Red
A red themed derivation of https://github.com/horst3180/arc-theme
Stars: ✭ 117 (+207.89%)
Mutual labels:  gnome, gnome-shell
gnome-shell-extension-syncthing-indicator
Put an indicator on the panel signalling the Syncthing daemon status using SystemD
Stars: ✭ 40 (+5.26%)
Mutual labels:  gnome, gnome-shell
Gnome Shell Extension Installer
A bash script to search and install extensions from extensions.gnome.org
Stars: ✭ 124 (+226.32%)
Mutual labels:  gnome, gnome-shell
Dynamic Panel Transparency
Adds Transparency To The Gnome Shell Panel
Stars: ✭ 189 (+397.37%)
Mutual labels:  gnome, gnome-shell
Appfolders Manager Gnome Extension
A GNOME extension allowing easy management of "appfolders" directly from the applications grid.
Stars: ✭ 96 (+152.63%)
Mutual labels:  gnome, gnome-shell
gnome-shell-panel-date-format
Allows to customize the date format on the panel.
Stars: ✭ 30 (-21.05%)
Mutual labels:  gnome, gnome-shell
Ocean-blue-GDM3
Ocean Blue GDM3 theme for ubuntu
Stars: ✭ 27 (-28.95%)
Mutual labels:  gnome, gnome-shell
Dynamic Wallpaper Editor
A little utility for creation or edition of GNOME desktop's XML wallpapers
Stars: ✭ 116 (+205.26%)
Mutual labels:  gnome, gnome-shell
x11-fractional-display-scaling
Script and instructions to get fractional display scaling working nicely on Linux distros that use X11
Stars: ✭ 52 (+36.84%)
Mutual labels:  gnome, gnome-shell
Flat Remix
Flat Remix is an icon theme inspired by material design. It is mostly flat using a colorful palette with some shadows, highlights, and gradients for some depth.
Stars: ✭ 1,518 (+3894.74%)
Mutual labels:  gnome, gnome-shell
Bing Wallpaper Gnome Extension
GNOME shell extension that sets your desktop wallpaper & lock screen image to Microsoft Bing's Image of the Day.
Stars: ✭ 125 (+228.95%)
Mutual labels:  gnome, gnome-shell
Vimix Gtk Themes
Vimix is a flat Material Design theme for GTK 3, GTK 2 and Gnome-Shell etc.
Stars: ✭ 1,384 (+3542.11%)
Mutual labels:  gnome, gnome-shell
Loginized
Gnome GDM Login Theme Manager. Easy and Fast Login Theme Manipulation
Stars: ✭ 158 (+315.79%)
Mutual labels:  gnome, gnome-shell
Gnome Dash Fix
Sort GNOME apps dashboard by category.
Stars: ✭ 92 (+142.11%)
Mutual labels:  gnome, gnome-shell
Gnome Shell Volume Mixer
GNOME Shell Extension allowing separate configuration of PulseAudio devices
Stars: ✭ 95 (+150%)
Mutual labels:  gnome, gnome-shell
Cpupower
Gnome-Shell Extension for intel-pstate driver
Stars: ✭ 252 (+563.16%)
Mutual labels:  gnome, gnome-shell
Boston-Icons
Boston is an exclusive icon theme inspired by functionalist design and a touch of early computer icons. The project is focused on elemental properties, basic shapes, a reduced color palette and visual hierarchy.
Stars: ✭ 106 (+178.95%)
Mutual labels:  gnome, gnome-shell

g3kb-switch

This is a CLI keyboard layout switcher for Gnome 3 and 4x. It is not based on the X interface but rather implements direct D-Bus messaging with the Gnome Shell.

Installation

Build requires glib-2.0, so you need to install the corresponding development package.

In Ubuntu.

$ sudo apt-get install libglib2.0-dev

In Fedora / RHEL / CentOS.

$ sudo dnf install glib2-devel

In Gentoo.

$ sudo emerge -av dev-libs/glib

Commands may differ in other Linux distributions.

Now build the program.

$ mkdir build && cd build
$ cmake -DCMAKE_BUILD_TYPE=Release ..
$ make
$ sudo make install

In Gnome 41 the switcher will only work with G3kbSwitch Gnome Shell extension because method org.gnome.Shell.Eval that was used in the original implementation of the switcher is now disabled for security reasons. In this case, an additional option must be passed to cmake.

$ cmake -DCMAKE_BUILD_TYPE=Release -DG3KBSWITCH_WITH_GNOME_SHELL_EXTENSION=ON ..

Also, the extension must be installed.

$ cd ../extension
$ make install  # no sudo required!

It is wise to make sure that the extension works correctly. In Fedora 34 and 35 it must be enabled from gnome-extensions-app.

A small smoke-test of the extension.

$ gdbus call --session --dest org.gnome.Shell --object-path /org/g3kbswitch/G3kbSwitch --method org.g3kbswitch.G3kbSwitch.List
(true, '[{"key":"0","value":"ru"},{"key":"1","value":"us"}]')
$ gdbus call --session --dest org.gnome.Shell --object-path /org/g3kbswitch/G3kbSwitch --method org.g3kbswitch.G3kbSwitch.Get
(true, '1')
$ gdbus call --session --dest org.gnome.Shell --object-path /org/g3kbswitch/G3kbSwitch --method org.g3kbswitch.G3kbSwitch.Set 1
(true, '')

Usage

Usage: g3kb-switch [-p]      Show the current layout group
       g3kb-switch -l        Show available layout groups
       g3kb-switch -n        Switch to the next layout group
       g3kb-switch -s ARG    Switch to layout group ARG
       g3kb-switch -h        Show this message and exit
       g3kb-switch -v        Show the program version and exit

Integration with vim-xkbswitch

Basically, put in .vimrc lines

let g:XkbSwitchEnabled = 1
let g:XkbSwitchLib = '/usr/local/lib/libg3kbswitch.so'

See details about configuration rules for vim-xkbswitch here.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].