QXCapIndicator

Caps/Num lock key indicator in tray

QXCapIndicator

QXCapIndicator is a simple tool for indicating the status of Caps Lock and Num Lock keys in the system tray.

Features

  • Monitor Caps Lock and Num Lock keys
  • Toggle Caps Lock and Num Lock with an on-screen button
  • Hideable indicators
  • Adjustable update rate
  • Wayland support (with Evdev)

Installation

Clone this repository

git clone https://codeberg.org/itszariep/qxcapindicator
cd qxcapindicator

Choose the backend you want to use:

  • With Evdev Backend
cmake -DWITHX11=OFF -B build
  • With X11 Backend
cmake -DWITHX11=ON .. -B build

Backend Differences

QXCapIndicator supports two backends for fetching key status: X11 and Evdev. Each backend has its own capabilities and limitations.

X11 Backend

  • Uses XkbGetState to fetch the key status.
  • Checks cannot be done in real time without generating high CPU usage.
  • Some options are not available:
    • Initial Visual State: Cannot set the initial visual state of Caps Lock/Num Lock (unnecessary with XkbGetState).

Evdev Backend

  • Uses libinput_event_get_keyboard_event to fetch the key status.
  • Checks can be real time without high CPU Usage
  • Some options are not available:
    • Update Rate: Cannot change update rate because polling intercepts events (and is not really necessary because there is no CPU usage penalty).
    • Toggle: Can’t be implemented without root access.

Configuration

You can configure QXCapIndicator with the integrated GUI (settings in indicator menu) or by editing $HOME/.config/qxcapindicator using the following options:

ItemDescriptionPossible ValuesDefault ValueExampleScope
showcapEnables the Caps Lock key indicator0, 11showcap=1All
shownumEnables the Num Lock key indicator0, 11shownum=1All
updrateSets the update rate(Number)0updrate=0X11
vcapstateSets the initial visual state of Caps Lock0, 10vcapstate=0Evdev
vnumstateSets the initial visual state of Num Lock0, 10vnumstate=0Evdev

© 2026 Zariep's portfolio

Powered by Tessera for Hugo