Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/deficient/keyboard-layout-indicator
Keyboard layout indicator/switcher widget for awesome-wm
https://github.com/deficient/keyboard-layout-indicator
awesome-wm keyboard-layout switcher-widget
Last synced: 4 months ago
JSON representation
Keyboard layout indicator/switcher widget for awesome-wm
- Host: GitHub
- URL: https://github.com/deficient/keyboard-layout-indicator
- Owner: deficient
- License: unlicense
- Archived: true
- Created: 2012-12-31T15:00:37.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2024-08-18T20:10:56.000Z (6 months ago)
- Last Synced: 2024-08-18T21:26:51.456Z (6 months ago)
- Topics: awesome-wm, keyboard-layout, switcher-widget
- Language: Lua
- Size: 22.5 KB
- Stars: 30
- Watchers: 5
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-awesomewm-modules-widgets-and-libraries - keyboard-layout-indicator
- awesome-awesomewm-modules-widgets-and-libraries - keyboard-layout-indicator
README
**This repository has been assimilated into** https://github.com/deficient/deficient
## awesome.keyboard-layout-indicator
### Description
Keyboard layout indicator+switcher widget for awesome window manager.
### Installation
Drop the script into your awesome config folder. Suggestion:
```bash
cd ~/.config/awesome
git clone https://github.com/deficient/keyboard-layout-indicator.git
```### Usage
In your `rc.lua`:
```lua
-- load the widget code
local layout_indicator = require("keyboard-layout-indicator")-- define your layouts
kbdcfg = layout_indicator({
layouts = {
{name="dv", layout="de", variant="dvorak"},
{name="de", layout="de", variant=nil},
{name="us", layout="us", variant=nil}
},
-- optionally, specify commands to be executed after changing layout:
post_set_hooks = {
"xmodmap ~/.Xmodmap",
"setxkbmap -option caps:escape"
}
})-- add the widget to your wibox
...
right_layout:add(kbdcfg.widget)
...-- Add bindings
local globalkeys = awful.util.table.join(
...
awful.key({ "Shift" }, "Shift_R", function() kbdcfg:next() end ),
awful.key({ "Mod4", "Shift" }, "Shift_R", function() kbdcfg:prev() end ),
...
)
```NOTE: middle click on the widget executes a prompt which lets you set a custom
keyboard layout. However, this will work only if you assign `s.mypromptbox` as
in the awesome 4.0 default `rc.lua`. Otherwise, you have to rebind the
behaviour manually, see the source code.### Requirements
* [awesome 4.0](http://awesome.naquadah.org/)