Omahub
← All plugins
D

Lock Keys

by Dorneles

Displays status indicators on the bar for Caps Lock, Num Lock, and Scroll Lock keys with click toggles, visual settings, and smart notifications.

Security review

Review recommended · 1 finding

Deterministic scan — not a security guarantee

Low
Risk level
Low
Analyzed commit
7d9a241
Scanned
1 month ago

Flagged patterns appear only in documentation files (README / docs) — descriptive examples, not executable code.

  • Docs external_hosts README.md:54

    Downloads or connects to an external HTTP(S) host.

    git clone https://github.com/jvlianodorneles/lock-keys.git ~/.config/omarchy/plugins/dorneles.lock-keys

Automated analysis only — not a security guarantee.

AI advisory review

No obvious issues detected

Language-model assessment · ~deepseek/deepseek-v4-flash-latest — advisory only

None
AI risk level
None
Recommendation
install
Model
~deepseek/deepseek-v4-flash-latest
Analyzed commit
7d9a241
Reviewed
1 month ago

The plugin is a straightforward QML bar widget that reads keyboard LED state from sysfs/hyprctl and toggles lock keys via wtype/brightnessctl; no obfuscation, credential access, or destructive behavior was found. The deterministic scan's medium finding is a `git clone` example in the README, which is documentation only and not part of the executable plugin. The install/settings scripts only modify the user's Omarchy shell.json and restart the shell, which is expected behavior for this kind of plugin.

How this check works

This review combines the deterministic scan (the rule-based results above) with an independent look at the plugin's code by a language model. The model reads a trimmed sample of the repository's files, the manifest, and the README, then gives a plain-language risk level and a recommendation: install (no notable danger), review (look closer first), or avoid (clearly dangerous).

It runs on the same analyzed commit as the deterministic scan and is strictly advisory — it is not a security guarantee and never blocks a plugin by itself. A human moderator still reviews plugins before they are listed.

AI advisory only — automated analysis, not a security guarantee.

Install
$ omarchy plugin add https://github.com/jvlianodorneles/lock-keys --enable
Widgets #quickshell #system

Lock Keys for Omarchy ⌨️

Status bar indicator plugin for Omarchy that monitors and displays the active states of Caps Lock, Num Lock, and Scroll Lock keys, with interactive click toggles, visual settings window, OSD notifications, and smart power saving.

<p align="center"> <img src="preview.png" alt="Lock Keys Plugin Preview" width="650"> </p>

✨ Features

  • ⚡ Fast & Smart Polling: Reads Linux kernel LED states directly from /sys/class/leds/ with automatic idle backoff to save battery (~4ms execution).
  • 🔔 Synchronous OSD Notifications: Displays clean on-screen notifications whenever Caps Lock, Num Lock, or Scroll Lock is toggled (can be turned on/off in settings).
  • 🖱️ Interactive Mouse Controls:
    • Left-Click: Toggles the key's state immediately (Caps Lock, Num Lock, or Scroll Lock).
    • Middle-Click: Quick-cycles through visual styles (Text ➔ Compact ➔ Icons).
    • Right-Click: Opens the visual configuration popup directly on the status bar.
  • 🎯 Configurable Display Modes:
    • Always Show: All 3 indicators are visible (active keys highlighted, inactive keys dimmed).
    • Active Only: Displays only keys that are currently active (ON). When all keys are OFF, the widget collapses and consumes 0 space on the bar.
  • 🎨 3 Label Styles:
    • Text: CAPS, NUM, SCR
    • Compact: C, N, S
    • Icons: Nerd Font glyphs (󰬈, 󰎠, 󰜎)
  • 💊 2 Badge Styles:
    • Flat: Clean minimalist transparent background.
    • Pill / Badge: Rounded capsule badge highlighting active states.
  • 📐 Orientation Responsive: Automatically adapts layout for both horizontal and vertical bars.
  • 🎨 Omarchy Theme Integration: Seamlessly follows system themes, font families, and colors (bar.urgent, bar.barForeground, bar.fontFamily).

📋 Requirements & Dependencies

  • Linux Kernel: standard /sys/class/leds/ interface (built-in).
  • Nerd Fonts: (optional) recommended for rendering glyphs in icons mode (shipped by default in Omarchy).
  • wtype: (optional) used for simulating key presses when left-clicking to toggle locks.
  • libnotify / notify-send: (optional) for OSD desktop notifications.

📦 Installation

Install directly with the Omarchy CLI:

omarchy plugin add https://github.com/jvlianodorneles/lock-keys.git --enable --yes

Or clone manually into your plugins folder:

git clone https://github.com/jvlianodorneles/lock-keys.git ~/.config/omarchy/plugins/dorneles.lock-keys
omarchy-shell shell rescanPlugins
omarchy plugin enable dorneles.lock-keys

🗑️ Removal / Uninstallation

To disable or remove the plugin from Omarchy:

# Disable the widget from the bar
omarchy plugin disable dorneles.lock-keys

# Or completely remove the plugin
omarchy plugin remove dorneles.lock-keys --yes

If installed manually:

omarchy plugin disable dorneles.lock-keys
rm -rf ~/.config/omarchy/plugins/dorneles.lock-keys
omarchy-shell shell rescanPlugins

🎮 Usage & Controls

Action Control Description
Toggle Key Left-Click Toggles state of Caps Lock, Num Lock, or Scroll Lock
Cycle Style Middle-Click Cycles styles: Text ➔ Compact ➔ Icons
Open Settings Right-Click Opens the visual configuration popup menu

⚙️ Configuration (~/.config/omarchy/shell.json)

You can configure the widget directly via the right-click popup or by editing ~/.config/omarchy/shell.json:

{
  "id": "dorneles.lock-keys",
  "mode": "always",
  "style": "icons",
  "badgeStyle": "pill",
  "showNotifications": true,
  "showCaps": true,
  "showNum": true,
  "showScroll": true
}

Options Reference

Option Type Options / Values Default Description
mode enum "always", "active-only" "always" "always" shows all keys; "active-only" shows indicators only when ON.
style enum "text", "compact", "icons" "text" Indicator label appearance.
badgeStyle enum "flat", "pill" "flat" "flat" transparent style vs "pill" capsule style.
showNotifications boolean true, false true Show brief on-screen notification on lock change.
showCaps boolean true, false true Show/hide Caps Lock indicator.
showNum boolean true, false true Show/hide Num Lock indicator.
showScroll boolean true, false true Show/hide Scroll Lock indicator.
intervalMs integer 100 - 5000 250 Active status refresh interval in ms.

📄 License

This project is licensed under the MIT License.