Skip to content

Commit

Permalink
Add battery monitoring
Browse files Browse the repository at this point in the history
  • Loading branch information
nokyan committed Jun 8, 2024
1 parent 648e6fa commit 92024f8
Show file tree
Hide file tree
Showing 10 changed files with 822 additions and 12 deletions.
7 changes: 0 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,6 @@ Running Resources is as simple as typing `flatpak run net.nokyan.Resources` into
If you've built Resources natively or installed it from a traditional package manager such as `apt` or `dnf`, or if you've built Resources yourself, typing `resources` in a terminal will start Resources.
If you've built Resources as a Flatpak, type `flatpak-builder --run flatpak_app build-aux/net.nokyan.Resources.Devel.json resources` into your terminal or use one of the aforementioned IDEs to do that automatically.

## To-do

The following list is *roughly* in order of their importance with the most important item being first in the list.

- Translations
- Battery usage and details

## Contributing

If you have an idea, bug report, question or something else, don't hesitate to [open an issue](https://github.com/nokyan/resources/issues)! Translations are always welcome.
4 changes: 4 additions & 0 deletions data/resources/icons/battery-symbolic.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions data/resources/resources.gresource.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
<file compressed="true" preprocess="xml-stripblanks">ui/dialogs/process_dialog.ui</file>
<file compressed="true" preprocess="xml-stripblanks">ui/dialogs/settings_dialog.ui</file>
<file compressed="true" preprocess="xml-stripblanks">ui/pages/applications.ui</file>
<file compressed="true" preprocess="xml-stripblanks">ui/pages/battery.ui</file>
<file compressed="true" preprocess="xml-stripblanks">ui/pages/cpu.ui</file>
<file compressed="true" preprocess="xml-stripblanks">ui/pages/drive.ui</file>
<file compressed="true" preprocess="xml-stripblanks">ui/pages/gpu.ui</file>
Expand Down
106 changes: 106 additions & 0 deletions data/resources/ui/pages/battery.ui
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<template class="ResBattery" parent="AdwBin">
<property name="child">
<object class="GtkScrolledWindow">
<child>
<object class="AdwClamp">
<property name="maximum-size">768</property>
<child>
<object class="GtkBox">
<property name="margin-top">24</property>
<property name="margin-bottom">24</property>
<property name="margin-start">16</property>
<property name="margin-end">16</property>
<property name="spacing">24</property>
<property name="orientation">vertical</property>
<property name="hexpand">true</property>
<property name="valign">start</property>
<property name="vexpand">true</property>
<child>
<object class="AdwPreferencesGroup">
<property name="title" translatable="yes">Usage</property>
<child>
<object class="ResGraphBox" id="charge"/>
</child>
<child>
<object class="ResGraphBox" id="power_usage"/>
</child>
</object>
</child>
<child>
<object class="AdwPreferencesGroup" id="modules">
<property name="title" translatable="yes">Properties</property>
<child>
<object class="AdwActionRow" id="health">
<property name="title" translatable="yes">Battery Health</property>
<style>
<class name="property"/>
</style>
<property name="subtitle-selectable">true</property>
</object>
</child>
<child>
<object class="AdwActionRow" id="design_capacity">
<property name="title" translatable="yes">Design Capacity</property>
<style>
<class name="property"/>
</style>
<property name="subtitle-selectable">true</property>
</object>
</child>
<child>
<object class="AdwActionRow" id="charge_cycles">
<property name="title" translatable="yes">Charge Cycles</property>
<style>
<class name="property"/>
</style>
<property name="subtitle-selectable">true</property>
</object>
</child>
<child>
<object class="AdwActionRow" id="technology">
<property name="title" translatable="yes">Technology</property>
<style>
<class name="property"/>
</style>
<property name="subtitle-selectable">true</property>
</object>
</child>
<child>
<object class="AdwActionRow" id="manufacturer">
<property name="title" translatable="yes">Manufacturer</property>
<style>
<class name="property"/>
</style>
<property name="subtitle-selectable">true</property>
</object>
</child>
<child>
<object class="AdwActionRow" id="model_name">
<property name="title" translatable="yes">Model Name</property>
<style>
<class name="property"/>
</style>
<property name="subtitle-selectable">true</property>
</object>
</child>
<child>
<object class="AdwActionRow" id="device">
<property name="title" translatable="yes">Device</property>
<style>
<class name="property"/>
</style>
<property name="subtitle-selectable">true</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</property>
</template>
</interface>
Loading

0 comments on commit 92024f8

Please sign in to comment.