* pulsar-mouse: make the per-state widget colors configurable Both widgets hardcoded their state colors: error for a fault, secondary while charging, error at the mouse's low-power threshold. The desktop widget's one `color` setting only covered the normal state, and the bar widget had no color setting at all. Expose all four states (normal/charging/low/error) as `type = "color"` settings on each widget, in the same shape battery-widget uses. Defaults reproduce exactly what was hardcoded, so an existing install renders identically until someone changes one. The new settings are `advanced`; the desktop widget's pre-existing `color` stays where it was so it does not disappear behind the toggle for anyone already using it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * pulsar-mouse: rename the bar's normal-state key to normal_color A bar widget's plugin settings share one TOML table with Noctalia's own per-widget presentation settings, where `color` already exists ("Color role for this widget's icon and label"). A plugin declaring `color` there does not shadow it, it aliases it - one `color = "primary"` under [widget.<id>] drove both pickers at once, so setting either silently moved the other. Renamed to `normal_color`, which also makes the retest unambiguous: the glyph follows the plugin setting while Presentation's own Color picker stays on Default. The desktop widget keeps plain `color` - no clash there, and renaming it would break existing configs. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
155 lines
4.7 KiB
TOML
155 lines
4.7 KiB
TOML
# Pulsar Mouse battery/charging status - bar widget and desktop widget - plus
|
|
# a quick-controls panel (profile switching, DPI/polling/lighting/power
|
|
# settings across Sensor/Advanced/Lighting/Power tabs) opened by clicking
|
|
# the bar widget.
|
|
#
|
|
# The battery-reading entries (bar, battery) read the reading pulsar-mouse-gui
|
|
# already writes on every poll (~/.cache/pulsar-mouse/battery.json) rather
|
|
# than doing their own USB read - avoids duplicate polling of the mouse's
|
|
# wireless link. Each falls back to invoking the `pulsar-mouse` CLI directly
|
|
# if that file is missing or stale (e.g. the GUI/tray isn't running, or was
|
|
# never installed at all - CLI-only setups just always take this path), so
|
|
# both still work standalone. The controls panel always talks to the CLI
|
|
# directly (DPI/polling rate aren't in that cached file, and writes can't be
|
|
# cached at all).
|
|
#
|
|
# Desktop widgets are shared with the lock screen (LockscreenWidgetsHost
|
|
# reuses the same widget type registry as the desktop), so the desktop_widget
|
|
# entry shows up in both places once added via the widget editor.
|
|
|
|
id = "harveywuk/pulsar-mouse"
|
|
name = "Pulsar Mouse"
|
|
version = "1.7.0"
|
|
plugin_api = 9
|
|
author = "harveywuk"
|
|
license = "MIT"
|
|
dependencies = ["pulsar-mouse"]
|
|
tags = ["hardware", "system"]
|
|
icon = "mouse"
|
|
description = "Battery status and quick sensor/lighting/power controls for a Pulsar gaming mouse - bar, desktop, and lock screen."
|
|
|
|
[[widget]]
|
|
id = "bar"
|
|
entry = "bar.luau"
|
|
|
|
[[widget.setting]]
|
|
key = "glyph_size"
|
|
type = "int"
|
|
label_key = "settings.glyph_size.label"
|
|
default = 16
|
|
min = 10
|
|
max = 32
|
|
step = 1
|
|
|
|
# Per-state glyph colors. The defaults reproduce what used to be hardcoded,
|
|
# so an existing install looks identical until someone changes one. Marked
|
|
# advanced since the interesting knob for most people is glyph_size - these
|
|
# are for matching a specific colorscheme.
|
|
#
|
|
# Deliberately NOT called `color`: a bar widget's settings share one TOML
|
|
# table with Noctalia's own per-widget presentation settings, and `color`
|
|
# is already taken there (the "Color role for this widget's icon and
|
|
# label" one). Declaring it here doesn't shadow that setting, it aliases
|
|
# it - one `color = ...` key ends up backing both pickers, so setting
|
|
# either silently moves the other. The desktop widget has no such clash,
|
|
# which is why its equivalent is still plain `color`.
|
|
[[widget.setting]]
|
|
key = "normal_color"
|
|
type = "color"
|
|
label_key = "settings.normal_color.label"
|
|
description_key = "settings.normal_color.description"
|
|
default = "on_surface"
|
|
advanced = true
|
|
|
|
[[widget.setting]]
|
|
key = "charging_color"
|
|
type = "color"
|
|
label_key = "settings.charging_color.label"
|
|
description_key = "settings.charging_color.description"
|
|
default = "secondary"
|
|
advanced = true
|
|
|
|
[[widget.setting]]
|
|
key = "warning_color"
|
|
type = "color"
|
|
label_key = "settings.warning_color.label"
|
|
description_key = "settings.warning_color.description"
|
|
default = "error"
|
|
advanced = true
|
|
|
|
[[widget.setting]]
|
|
key = "error_color"
|
|
type = "color"
|
|
label_key = "settings.error_color.label"
|
|
description_key = "settings.error_color.description"
|
|
default = "error"
|
|
advanced = true
|
|
|
|
[[panel]]
|
|
id = "controls"
|
|
entry = "panel.luau"
|
|
width = 320
|
|
height = 380
|
|
placement = "attached"
|
|
position = "auto"
|
|
open_near_click = true
|
|
|
|
[[desktop_widget]]
|
|
id = "battery"
|
|
entry = "desktop.luau"
|
|
|
|
[[desktop_widget.setting]]
|
|
key = "color"
|
|
type = "color"
|
|
label_key = "settings.color.label"
|
|
description_key = "settings.color.description"
|
|
default = "primary"
|
|
|
|
# The other three states (see bar's copy of these) - `color` above stays
|
|
# non-advanced since it's the one that was always here.
|
|
[[desktop_widget.setting]]
|
|
key = "charging_color"
|
|
type = "color"
|
|
label_key = "settings.charging_color.label"
|
|
description_key = "settings.charging_color.description"
|
|
default = "secondary"
|
|
advanced = true
|
|
|
|
[[desktop_widget.setting]]
|
|
key = "warning_color"
|
|
type = "color"
|
|
label_key = "settings.warning_color.label"
|
|
description_key = "settings.warning_color.description"
|
|
default = "error"
|
|
advanced = true
|
|
|
|
[[desktop_widget.setting]]
|
|
key = "error_color"
|
|
type = "color"
|
|
label_key = "settings.error_color.label"
|
|
description_key = "settings.error_color.description"
|
|
default = "error"
|
|
advanced = true
|
|
|
|
[[desktop_widget.setting]]
|
|
key = "show_progress"
|
|
type = "bool"
|
|
label_key = "settings.show_progress.label"
|
|
default = true
|
|
|
|
[[desktop_widget.setting]]
|
|
key = "show_percent"
|
|
type = "bool"
|
|
label_key = "settings.show_percent.label"
|
|
description_key = "settings.show_percent.description"
|
|
default = true
|
|
|
|
[[desktop_widget.setting]]
|
|
key = "glyph_size"
|
|
type = "int"
|
|
label_key = "settings.glyph_size.label"
|
|
default = 28
|
|
min = 16
|
|
max = 64
|
|
step = 2
|