Skip to content

Add battery percentage display to launcher clock panel#4317

Closed
Copilot wants to merge 5 commits intodevfrom
copilot/add-battery-percentage-ui
Closed

Add battery percentage display to launcher clock panel#4317
Copilot wants to merge 5 commits intodevfrom
copilot/add-battery-percentage-ui

Conversation

Copy link
Contributor

Copilot AI commented Mar 4, 2026

  • Fix PowerStatus NuGet package version to 1.0.3 in Flow.Launcher.csproj
  • Add UseBattery setting to Settings.cs
  • Add BatteryText property and update clock/date/battery timer in MainViewModel.cs
  • Add BatteryBox TextBlock to ClockPanel in MainWindow.xaml (using ClockBox style)
  • Add battery settings card and preview to SettingPages/Views/SettingsPaneTheme.xaml
  • Add UseBattery and BatteryText properties to SettingsPaneThemeViewModel.cs
  • Add "Battery" localization string to Languages/en.xaml
  • Remove separate BatteryBox/BaseBatteryBox styles — reuse ClockBox style instead
Original prompt

This section details on the original issue you should resolve

<issue_title>Add next to the clock and date the option to see my battery percentage</issue_title>
<issue_description>Hi, when I have my taskbar mostly unlocked so its hidden unless I need to check my battery status,
I would like when I open my launcher to see next to the clock on the right my battery percentage instead of opening the taskbar.

Thank you very much </issue_description>

<agent_instructions>Add a new UI & settings. Use this package: https://www.nuget.org/packages/PowerStatus</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.


Summary by cubic

Adds an optional battery percentage next to the clock, controlled by a new setting and powered by PowerStatus, using the ClockBox style.

Summary of changes

  • Changed: Clock/date loop now reads battery status when enabled; BatteryBox uses ClockBox style in main UI and settings preview; packages.lock updates Flow.Launcher.Plugin to 5.2.0; reverted unnecessary non-functional changes.
  • Added: PowerStatus 1.0.3; Settings.UseBattery (default off); BatteryText property and bindings; settings toggle and preview; "Battery" locale string.
  • Removed: Separate BaseBatteryBox/BatteryBox styles from themes.
  • Memory usage: Minimal; one PowerStatusProvider instance; short string; reuses existing timer.
  • Security: Low risk; reads local system power info only; no network or elevated permissions; dependency version pinned.
  • Tests: None.

Written for commit b67ad4d. Summary will update on new commits.

@prlabeler prlabeler bot added the bug Something isn't working label Mar 4, 2026
Co-authored-by: Jack251970 <53996452+Jack251970@users.noreply.github.com>
@prlabeler prlabeler bot added the enhancement New feature or request label Mar 4, 2026
- Add PowerStatus NuGet package (v1.0.3)
- Add UseBattery setting to Settings.cs
- Add BatteryText property and update periodic timer in MainViewModel
- Add BatteryBox TextBlock to ClockPanel in MainWindow.xaml
- Add BaseBatteryBox and BatteryBox styles to Base.xaml and all theme files
- Add UseBattery toggle and preview to SettingsPaneTheme
- Add Battery localization string to en.xaml

Co-authored-by: Jack251970 <53996452+Jack251970@users.noreply.github.com>
Copilot AI changed the title [WIP] Add battery percentage next to clock on taskbar Add battery percentage display to launcher clock panel Mar 4, 2026
@Jack251970
Copy link
Member

@copilot Please remove BatteryBoxStyle and use the same style as clock panel

- Remove BaseBatteryBox and BatteryBox style definitions from Base.xaml
- Remove BatteryBox style overrides from all theme files
- Update BatteryBox TextBlock in MainWindow.xaml to use ClockBox style
- Update BatteryBox TextBlock in SettingsPaneTheme.xaml to use ClockBox style

Co-authored-by: Jack251970 <53996452+Jack251970@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Mar 4, 2026

@copilot Please remove BatteryBoxStyle and use the same style as clock panel

Done in 9ed4097. Removed all BatteryBox/BaseBatteryBox style definitions from Base.xaml and all theme files. The BatteryBox TextBlock in both MainWindow.xaml and the settings preview now use Style="{DynamicResource ClockBox}" directly.

@Jack251970 Jack251970 closed this Mar 4, 2026
@Jack251970 Jack251970 removed bug Something isn't working enhancement New feature or request 1 min review labels Mar 6, 2026
@prlabeler prlabeler bot added the bug Something isn't working label Mar 6, 2026
@Jack251970 Jack251970 removed the bug Something isn't working label Mar 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants