A widget to display when CAPS LOCK is active
Go to file
Stefano Mazzucco dd9f578048 Add capslock.lua file, README and screenshot 2017-07-20 22:23:01 +01:00
screenshots Add capslock.lua file, README and screenshot 2017-07-20 22:23:01 +01:00
.gitignore Add capslock.lua file, README and screenshot 2017-07-20 22:23:01 +01:00
LICENSE Initial commit 2017-07-20 21:00:28 +00:00
README.md Add capslock.lua file, README and screenshot 2017-07-20 22:23:01 +01:00
capslock.lua Add capslock.lua file, README and screenshot 2017-07-20 22:23:01 +01:00

README.md

A simple CAPS LOCK widget for Awesome

Useful when you have a keyboard that does not have a CAPS LOCK indicator.

This widget is really simple and parses the output of xset to figure out whether CAPS LOCK is active or not. (Hint: you need the xset utility for this widget to work)

Installation

  1. Ensure that xset is available to you on your system.
  2. Copy capslock.lua in your ~/.config/awesome/rc.lua (e.g. by cloning this repository).
  3. Restart Awesome (e.g. press modkey + Control or run awesome-client "awesome.restart()" from a terminal).

Usage

For Awesome 4.x, add the following to your ~/.config/awesome/rc.lua:

local capslock = require("capslock")

-- more config here

    -- Add widgets to the wibox
    s.mywibox:setup {
-- more config here
      { -- Right widgets
        layout = wibox.layout.fixed.horizontal,
        wibox.widget.systray(),
        capslock,
-- more config here
-- {{{ Key bindings
local globalkeys = awful.util.table.join(
  capslock.key,
-- more config follows

Now, when you activate CAPS LOCK, a chevron sign will be displayed: capslock screenshot

Contributing

If you have ideas about how to make this better, feel free to open an issue or submit a pull request.