Skip to main content

Automatically switch layout based on your active window

Project description

Swytcher

https://img.shields.io/pypi/v/swytcher.svg https://img.shields.io/travis/eddie-dunn/swytcher.svg Documentation Status Updates

Automatically switches your keyboard layout based on your active window.

Are you using multiple keyboard layouts? Have you discovered that the US keyboard layout is a lot more suitable for programming than the layout you have to use when writing email or otherwise communicating in your native language?

Does it annoy you that you need to remember to manually switch between layouts when going from VIM to your chat/email/whatever app?

If so, Swytcher will solve your problems.

Features

  • Switch keyboard layout based on X window class

  • Switch keyboard layout based on X window name

Planned features

  • Switch layout based on combination of window class and name

  • Remember last keyboard layout for each window

Installation

$ pip install --user swytcher

Usage

First, copy the sample configuration:

$ swytcher --cpcfg

Now you can edit ~/.config/swytcher/config.ini and add the window classes/names to the corresponding layout section.

layout_primary maps to your first keyboard layout, and layout_secondary will map to your second. If you have more than two layouts you will have to add more sections to the config file. Each additional layout section must start with layout, and be uniquely named. The order that they have in the config file should map to the order that you have defined your different layouts in.

Once you are done editing your config file, you can start Swytcher, and your keyboard layout will be switched whenever you change focus to a window that corresponds to a window class and/or name in your config file.

Swytcher has been tested with the Gnome Desktop Environmant and the i3 window manager. Since Swytcher looks at your X keyboard config it should work with most DEs and WMs.

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

History

0.3.0 (2017-09-02)

Added

  • –version to CLI interface.

  • command for copying sample config to user’s confdir.

0.1.0 (2017-03-23)

  • First release on PyPI.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

swytcher-0.3.2.tar.gz (26.6 kB view details)

Uploaded Source

Built Distribution

swytcher-0.3.2-py3-none-any.whl (12.0 kB view details)

Uploaded Python 3

File details

Details for the file swytcher-0.3.2.tar.gz.

File metadata

  • Download URL: swytcher-0.3.2.tar.gz
  • Upload date:
  • Size: 26.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for swytcher-0.3.2.tar.gz
Algorithm Hash digest
SHA256 d3fd8e5aa6e56f39ff8f26ba38f927db61622713c60941c5701e05fddccb403a
MD5 e0ad0d47365c7b608ef45495888b804e
BLAKE2b-256 d859782574525b5b346f97a85011e740b458d7d3d3ea40647ddc1411d02395ad

See more details on using hashes here.

File details

Details for the file swytcher-0.3.2-py3-none-any.whl.

File metadata

File hashes

Hashes for swytcher-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 abcbc6f6245ff859d3430d581570b7fe76dd2653d7a4216d53644833bd7b306f
MD5 c8145373bc83311efbc564695d747293
BLAKE2b-256 96f57df850796cd37114890adef712a64f164e762ed35efb9dcea5981e0ac064

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page