Add system controls dashboard widget (brightness, volume, power plans) #708
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
Description
SystemControlsWidgetatsrc/dashboard/widgets/system_controls.rsthat uses aTimedCacheto refresh and render brightness, volume/mute, and power-plan controls and shows per-control fallback/error messages when features are unavailable.src/actions/system.rs:get_system_volume,get_system_mute,get_main_display_brightness,get_power_plans,set_power_planand aPowerPlanstruct, plus a Windows-only parserparse_powercfg_listforpowercfg /Loutput.src/launcher.rs: addActionKind::VolumeToggleMuteandActionKind::PowerPlanSet, parsevolume:toggle_muteandpower:plan:set:<guid>, callsystem::toggle_system_mute()andsystem::set_power_plan()in the dispatch path, and add atoggle_system_mutehelper in the launcher implementation.src/dashboard/widgets/mod.rsand implement UI behavior to dispatch the existing action strings (e.g.brightness:set:<n>,volume:set:<n>,volume:toggle_mute,power:plan:set:<guid>).Testing
powercfgoutput parsing (src/launcher.rstests for parsing new action prefixes andsrc/actions/system.rsWindows-only test forparse_powercfg_list).cargo test --libin this environment but the build failed before executing tests due to a missing system library required byalsa-sys(pkg-config/alsa.pcnot present), so the new unit tests were not executed here.cargo test --lib(would run added parse tests); execution blocked by environment dependency failure as noted above.Codex Task