TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/ryzhpolsos/redeye/llms.txt
Use this file to discover all available pages before exploring further.
media.* family of expression functions gives your shell configuration direct control over hardware-level system settings: screen brightness via WMI, audio volume via the Windows Core Audio API, and battery charge level via WMI. These functions integrate naturally into onClick attributes on buttons, action attributes on hotkeys, or polling widgets that display live system state.
Brightness control requires a WMI-compatible monitor driver (
WmiMonitorBrightness). On desktop systems without a supported display driver, media.getBrightness() returns -1 and media.setBrightness() throws an exception. Battery functions return -1 on systems without a battery.Brightness
media.getBrightness()
media.getBrightness()
Reads the current screen brightness from the WMI monitor brightness provider.Returns: An integer string from
0 to 100 representing the current brightness percentage, or -1 if the display driver does not support WMI brightness control.media.setBrightness(value)
media.setBrightness(value)
Sets the screen brightness to an absolute level.Returns: An empty string.
Target brightness level as an integer from
0 (minimum) to 100 (maximum).media.increaseBrightness([step])
media.increaseBrightness([step])
Increases the screen brightness by a fixed step. If Returns: An empty string.
step is not provided, the default increment is 10.The number of percentage points to add to the current brightness. Defaults to
10.media.decreaseBrightness([step])
media.decreaseBrightness([step])
Decreases the screen brightness by a fixed step. If Returns: An empty string.
step is not provided, the default decrement is 10.The number of percentage points to subtract from the current brightness. Defaults to
10.Brightness hotkeys
You can bind brightness controls directly inkeyBindings.xml:
Volume
media.getVolume()
media.getVolume()
Reads the current master volume level of the default audio output device via the Windows Core Audio API.Returns: An integer string from
0 to 100 representing the current volume percentage.media.setVolume(value)
media.setVolume(value)
Sets the master volume of the default audio output device to an absolute level.Returns: An empty string.
Target volume level as an integer from
0 (silent) to 100 (maximum).media.increaseVolume([step])
media.increaseVolume([step])
Increases the master volume by a fixed step. If Returns: An empty string.
step is not provided, the default increment is 10.The number of percentage points to add to the current volume. Defaults to
10.media.decreaseVolume([step])
media.decreaseVolume([step])
Decreases the master volume by a fixed step. If Returns: An empty string.
step is not provided, the default decrement is 10.The number of percentage points to subtract from the current volume. Defaults to
10.Volume hotkeys
Battery
media.getBatteryLevel()
media.getBatteryLevel()
Reads the estimated remaining battery charge from
Win32_Battery via WMI.Returns: An integer string from 0 to 100 representing the remaining charge percentage, or -1 if no battery is present (e.g., on a desktop system).Full tray widget example
The following example shows how to compose a compact media control row using buttons wired to media functions, suitable for inclusion in a system tray area:Related pages
Expression functions
General-purpose functions: math, strings, process launching.
Window functions
Control shell and system windows by handle.
Hotkeys
Bind media functions to keyboard shortcuts.