GithubHelp home page GithubHelp logo

izq / xkblayout-state Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nonpop/xkblayout-state

0.0 0.0 0.0 23 KB

A small command-line program to get/set the current keyboard layout.

Makefile 2.24% C++ 97.76%

xkblayout-state's Introduction

README

Description

xkblayout-state is a small command-line program to get/set the current XKB keyboard layout.

It's a thin wrapper around a slightly version of Jay Bromley's XKeyboard class, the original of which is included in http://members.dslextreme.com/users/jbromley/files/ruby-xkb.tar.bz2.

Compilation and installation

  • To compile just say: make
  • To install copy the resulting executable xkblayout-state somewhere in your path

Usage

xkblayout-state can be used to either print keyboard layout information on stdout or set the currently active layout.

Printing keyboard layout information

The command to print keyboard layout information is

xkblayout-state print format

format is printed to stdout with the following substitutions (to include a literal % use %%):

  • %c -> The number of the currently active layout
  • %n -> The name of the currently active layout
  • %s -> The symbol of the currently active layout
  • %v -> The variant of the currently active layout (this is empty if no variant is specified)
  • %e -> The variant of the currently active layout (this is the same as %s if no variant is specified)
  • %C -> The number of defined layouts
  • %N -> A list containing the names of the layouts (one per line)
  • %S -> A list containing the symbols of the layouts (one per line)
  • %V -> A list containing the variants of the layouts (one per line; an empty line if no variant is specified for the respective layout)
  • %E -> A list containing the variants of the layouts (one per line; if no variant is specified for the respective symbol, the layout symbol is used)

Setting the active keyboard layout

The command to set the currently active keyboard layout is

xkblayout-state set [+-]number

number is the number of the layout to activate. It corresponds to the layouts in the order they appear in, for example, xkblayout-state print %N, starting from zero. If number begins with a plus or minus sign, the number'th layout counting from the currently active layout down or up the list is activated. It wraps around if the list is exceeded.

License

xkblayout-state is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version.

xkblayout-state is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. http://www.gnu.org/licenses/

xkblayout-state's People

Contributors

codedokode avatar ecks avatar karllinden avatar nonpop avatar selurvedu 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.