https://github.com/itszariep/gxcapindicator
Simple and universal Cap/Num lock key indicator in the tray
https://github.com/itszariep/gxcapindicator
appindicator ayatana-appindicator caps-lock evdev indicator num-lock tray udev wayland
Last synced: about 1 month ago
JSON representation
Simple and universal Cap/Num lock key indicator in the tray
- Host: GitHub
- URL: https://github.com/itszariep/gxcapindicator
- Owner: ItsZariep
- License: gpl-3.0
- Created: 2024-06-06T19:20:01.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2025-03-15T22:27:16.000Z (2 months ago)
- Last Synced: 2025-04-09T05:17:39.546Z (about 1 month ago)
- Topics: appindicator, ayatana-appindicator, caps-lock, evdev, indicator, num-lock, tray, udev, wayland
- Language: C
- Homepage: https://codeberg.org/ItsZariep/GXCapIndicator
- Size: 37.1 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GXCapIndicator
**GXCapIndicator** is a simple tool for indicating the status of Caps Lock and Num Lock keys in the system tray.
## Features
- [x] Monitor Caps Lock and Num Lock keys
- [x] Toggle Caps Lock and Num Lock with an on-screen button
- [x] Hideable indicators
- [x] Adjustable update rate
- [x] Wayland support (with `Evdev`)## Installation
To build GXCapIndicator, choose the backend you want to use:
### With Evdev Backend
```ini
make
```### With X11 Backend
```ini
make WITHX11=1
```## Backend Differences
GXCapIndicator 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 GXCapIndicator with the integrated GUI (`settings` in indicator menu) or by editing` $HOME/.config/gxcapindicator` using the following options:
| Item | Description | Possible Values | Default Value | Example | Scope |
|-------------|--------------------------------------|-----------------|---------------|-------------|---------|
| `showcap` | Enables the Caps Lock key indicator | `0`, `1` | `1` | `showcap=1` | All |
| `shownum` | Enables the Num Lock key indicator | `0`, `1` | `1` | `shownum=1` | All |
| `updrate` | Sets the update rate | (Number) | `0` | `updrate=0` | X11 |
| `vcapstate` | Sets the initial visual state of Caps Lock | `0`, `1` | `0` | `vcapstate=0` | Evdev |
| `vnumstate` | Sets the initial visual state of Num Lock | `0`, `1` | `0` | `vnumstate=0` | Evdev |