Git Product home page Git Product logo

i3-keyboard-layout's Introduction

i3-keyboard-layout

Change keyboard layout with a keystroke + show it in the status bar.

Install

Download i3-keyboard-layout, make sure it's executable (chmod + x <file>), and store it somewhere in your home directory (or in your $PATH if you prefer)

Usage

Assign a keystroke in your i3 configuration to switch to different layouts:

# ~/.config/i3/config

bindsym $mod+z exec path/to/i3-keyboard-layout set us
bindsym $mod+x exec path/to/i3-keyboard-layout set es

Alternatively (or aditionally), you can use a single keystroke to cycle through a list of your most used layouts:

# ~/.config/i3/config

bindsym $mod+space exec path/to/i3-keyboard-layout cycle us es de

Each time you press that key, the next layout on the list will be selected.

If you want to use layouts with variants, you can use quotes, like this:

# ~/.config/i3/config

bindsym $mod+space exec path/to/i3-keyboard-layout cycle us "us euro"

Display current layout

NOTE: You can skip this part if you use some kind of tray indicator such as sbxkb, which is probably what you want if you prefer a flag instead of the name of the layout.

A subcommand is included to display the current layout on the i3status bar. On your bar configuration, you need to pipe i3status onto the i3status subcommand:

# ~/.config/i3/config

bar {
  # status_command i3status # this is the usual default configuration
  status_command i3status | i3-keyboard-layout i3status
}

i3status needs to be configured tou output the i3bar JSON format (which is usually the default):

# ~/.config/i3status/config

general {
  output_format = i3bar
}

At this point only prepending the layout at the left of everything else is supported.

i3 bar

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.