Omarchy Vivobook RGB
An Omarchy bar-widget host and system-tray control panel for supported ASUS Vivobook HID LampArray keyboards. It applies the current Omarchy theme color, manual RGB colors, brightness, and lighting off without requiring privileged commands.
Tested hardware: ASUS Vivobook S 14 S5406SA with controller 0B05:19B6.
Other Vivobook models may use a different controller or expose fewer vrgb
capabilities.
Why this exists
Omarchy themes can provide a keyboard.rgb color, but Vivobook keyboards use
different controllers and vrgb CLI versions. The tested S5406SA also needs a
short delay after firmware mode and a green-channel correction for automatic
theme colors.
This plugin keeps those device-specific steps in one helper. It gives the system tray a small control panel while leaving manual colors exact and using the normal user account for every keyboard action.
Requirements
- Omarchy Shell with third-party plugin support.
- A working
vrgbinstallation and its udev setup. The recommended CLI isvrgb0.3.5 or newer. - Normal-user access to the keyboard through the
vrgbudev group. Log out and back in after adding the group. - The system Python modules
python-dbusandpython-gobjectfor the tray entry. They are normally included with Omarchy's desktop stack.
The legacy AUR package vivobook-rgb 0.1.0 only searches for device
0B05:5570; it does not detect the tested S5406SA controller.
Install
Install and configure vrgb before adding the plugin. Confirm that keyboard
control works as your normal user, then log out and back in if you changed the
vrgb udev group.
omarchy plugin add https://github.com/DanielSuhett/omarchy-vivobook-rgb.git --enable --yes
The command discovers and enables the plugin. If it is already installed,
reload the shell with omarchy-shell shell rescanPlugins.
When the widget loads, it performs three startup tasks:
- Registers a numbered
theme-sethook that reapplies the theme color after an Omarchy theme change. - Applies the current theme color once.
- Registers the tray item that opens the panel through Quickshell IPC.
The tray helper is a single long-lived D-Bus process. The plugin does not run
a filesystem watcher. All keyboard actions use the normal user account; the
plugin never invokes sudo or pkexec.
Use
Click the keyboard icon in the system tray. The bar-widget entry stays
hidden and hosts the panel; the tray item is the visible control.
- Apply current theme color reads
keyboard.rgbfrom the active Omarchy theme. - Choose RGB color opens the system color dialog and applies the selected color.
- Color swatches apply red, green, blue, purple, warm, or white presets.
- Brightness changes the saved brightness when
vrgbsupports the modern CLI. - Power turns the lighting off. Status reports the controller state.
The OEM rainbow effect is not included. It would require a privileged authorization path for a mode this plugin does not need.
Theme transitions
For modern vrgb, a theme change uses one firmware-to-host transition, then
fades the saved color through 50%, 25%, and 0%. The helper swaps the RGB value
while the LEDs are dark, then fades the new color through 25%, 50%, and its
configured final brightness.
On the tested S5406SA, green-dominant theme colors appear too blue on the
keyboard LEDs. Automatic theme colors therefore remove the blue channel when
green is the dominant channel. Manual colors remain exact. Set
VIVOBOOK_RGB_CALIBRATE_GREEN=0 to disable this compensation.
The modern CLI path uses bin/theme-transition.py. If the transition helper
is unavailable or disabled, theme application falls back to a single static
color write. The legacy CLI path uses vrgb color RRGGBB and does not expose
brightness or state information.
Helper commands
The executable bin/vivobook-rgb-control accepts:
vivobook-rgb-control color RRGGBB
vivobook-rgb-control theme
vivobook-rgb-control theme-if-needed
vivobook-rgb-control off
vivobook-rgb-control brightness 0-100
vivobook-rgb-control state
vivobook-rgb-control status
theme-if-needed compares the active theme file, its metadata, the
calibration setting, and the configured brightness before writing. All helper
actions share one runtime lock so concurrent theme and manual writes cannot
interleave. Lock creation is exclusive, state updates are atomic, and helper
output exposed to the shell is capped at 4 KiB.
Configuration
All variables are optional. Values are read when the helper starts.
| Variable | Default | Purpose |
|---|---|---|
VIVOBOOK_RGB_COMMAND |
vrgb |
CLI command or path. |
VIVOBOOK_RGB_THEME_FILE |
~/.local/state/omarchy/current/theme/keyboard.rgb |
Theme RGB source. |
VIVOBOOK_RGB_THEME_STATE_FILE |
$XDG_RUNTIME_DIR/vivobook-rgb-theme.state, or ~/.cache/... |
Last-applied theme key and lock base path. |
VIVOBOOK_RGB_BRIGHTNESS |
100 |
Final brightness for theme colors. |
VIVOBOOK_RGB_CALIBRATE_GREEN |
1 |
Enable S5406SA green-channel compensation. |
VIVOBOOK_RGB_THEME_TRANSITION |
1 |
Enable the animated modern-CLI transition. |
VIVOBOOK_RGB_MODE_DELAY |
0.3 seconds |
Delay after leaving firmware mode. |
VIVOBOOK_RGB_TRANSITION_STEP_DELAY |
0.07 seconds |
Delay between animation frames. |
VIVOBOOK_RGB_THEME_TRANSITION_COMMAND |
bin/theme-transition.py |
Transition executable override. |
VIVOBOOK_RGB_MAX_OUTPUT_BYTES |
4096 |
Maximum helper output retained or shown (hard limit: 65536). |
Set VIVOBOOK_RGB_THEME_TRANSITION=0 for a static theme write. Increase
VIVOBOOK_RGB_MODE_DELAY if the keyboard ignores the first color after a mode
change; lower it only when the device remains reliable.
Repository layout
| Path | Responsibility |
|---|---|
manifest.json |
Omarchy plugin metadata and bar-widget entry point. |
BarWidget.qml |
Registers the panel, startup processes, and hidden bar anchor. |
Panel.qml |
Tray/popup UI and user interaction. |
bin/vivobook-rgb-control |
Validates input, selects CLI compatibility, locks, and applies colors. |
bin/theme-transition.py |
Direct HID transition for modern vrgb. |
bin/vivobook-rgb-tray.py |
StatusNotifierItem registration and panel toggle. |
install.sh |
Idempotently installs the theme-set hook. |
tests/test-control.sh |
Mock-CLI regression tests; no keyboard access is required. |
Validate locally
Run these commands from the repository root:
omarchy plugin validate .
bash -n install.sh bin/vivobook-rgb-control tests/test-control.sh
python3 -B - <<'PY'
import ast
from pathlib import Path
for path in (Path("bin/theme-transition.py"), Path("bin/vivobook-rgb-tray.py")):
ast.parse(path.read_text(), filename=str(path))
print("Python syntax: passed")
PY
python3 -B bin/vivobook-rgb-tray.py --check
tests/test-control.sh
tests/test-install.sh
If qmllint is installed, also run:
qmllint -I "${OMARCHY_PATH:-/usr/share/omarchy}/shell" BarWidget.qml Panel.qml
The shell test uses a temporary fake vrgb command and covers modern and
legacy syntax, theme deduplication, brightness validation, state parsing,
transition sequencing, and removal of unsupported actions.
Remove
Remove the hook before deleting the checkout:
rm -f ~/.config/omarchy/hooks/theme-set.d/00-vivobook-rgb
omarchy plugin remove io.github.danielsuhett.vivobook-rgb --yes
The installer only replaces a regular hook carrying this plugin's managed marker; it refuses symlinks and unrelated files. The installed hook also removes itself on the next theme change when it can no longer find the plugin helper.
Security
Omarchy plugins run as unsandboxed code inside omarchy-shell. This plugin
does not install services, make network requests, modify system files, or
invoke privilege escalation. The tray helper only registers a D-Bus item and
calls the existing Quickshell panel; it does not access the keyboard directly.