{"id":21277627,"url":"https://github.com/nstechbytes/battery","last_synced_at":"2025-03-15T13:25:08.811Z","repository":{"id":262755789,"uuid":"888250223","full_name":"NSTechBytes/Battery","owner":"NSTechBytes","description":"A custom Rainmeter plugin that provides various battery-related information, such as battery percentage, status, charge status, and battery details (name, ID). This plugin retrieves battery information using WMI (Windows Management Instrumentation) and is compatible with Rainmeter skins.","archived":false,"fork":false,"pushed_at":"2024-11-14T04:29:43.000Z","size":26,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-22T03:42:10.451Z","etag":null,"topics":["battery","battery-level","battery-monitor","c-sharp","dll","plugin","rainmeter","rainmeter-skin","skin"],"latest_commit_sha":null,"homepage":"https://nstechbytes.github.io/Nasir-Shahbaz/","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NSTechBytes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-14T04:19:24.000Z","updated_at":"2024-11-14T04:29:46.000Z","dependencies_parsed_at":"2024-11-20T10:19:02.179Z","dependency_job_id":null,"html_url":"https://github.com/NSTechBytes/Battery","commit_stats":null,"previous_names":["nstechbytes/battery"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NSTechBytes%2FBattery","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NSTechBytes%2FBattery/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NSTechBytes%2FBattery/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NSTechBytes%2FBattery/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NSTechBytes","download_url":"https://codeload.github.com/NSTechBytes/Battery/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243734310,"owners_count":20339269,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["battery","battery-level","battery-monitor","c-sharp","dll","plugin","rainmeter","rainmeter-skin","skin"],"created_at":"2024-11-21T10:06:32.639Z","updated_at":"2025-03-15T13:25:08.792Z","avatar_url":"https://github.com/NSTechBytes.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Rainmeter Battery Plugin\n\nA custom Rainmeter plugin that provides various battery-related information, such as battery percentage, status, charge status, and battery details (name, ID). This plugin retrieves battery information using WMI (Windows Management Instrumentation) and is compatible with Rainmeter skins.\n\n## Features\n\n- **Battery Percentage**: Displays the current battery percentage as a decimal (e.g., 75%).\n- **Battery Status**: Displays the current status of the battery (e.g., High, Low, Charging).\n- **Battery Status (Numeric)**: Displays the battery status in a numeric format (e.g., `0` for Unknown, `1` for High, `2` for Low, `3` for Critical, `4` for Charging).\n- **Battery Charge Status**: Displays whether the battery is charging or discharging.\n- **Battery Charge Status (Numeric)**: Displays `1` if charging, `0` if discharging.\n- **Battery Name**: Displays the battery's real name retrieved via WMI.\n- **Battery ID**: Displays the battery's real ID retrieved via WMI.\n\n## Installation\n\n### Requirements\n- [Rainmeter](https://www.rainmeter.net/) should be installed.\n- Ensure you have .NET Framework installed (the plugin requires .NET for WMI access).\n\n### How to Install\n1. Download the latest release of the plugin) or clone this repository.\n2. Compile the C# code into a DLL using Visual Studio (or use the precompiled DLL).\n3. Place the compiled `.dll` file in the `Plugins` folder of your Rainmeter installation (usually located in `Documents\\Rainmeter\\Plugins`).\n4. Create a Rainmeter skin that references the plugin. See the example skin configuration below for details.\n\n## Usage\n\n### Example Skin\n\nHere’s an example `.ini` file that displays the battery details from the plugin:\n\n```ini\n[Rainmeter]\nUpdate=1000\nDynamicWindowSize=1\nAccurateText=1\n\n[Variables]\nFontColor=255,255,255,255\nFontSize=12\nFontFace=Arial\n\n; Measure for Battery Percentage\n[MeasureBatteryPercentage]\nMeasure=Plugin\nPlugin=Battery\nMeasureType=BatteryPercentage\n\n; Measure for Battery Status as text (e.g., High, Low, Charging, etc.)\n[MeasureBatteryStatus]\nMeasure=Plugin\nPlugin=Battery\nMeasureType=BatteryStatus\n\n; Measure for Battery Status in Numeric form\n[MeasureBatteryStatusNumeric]\nMeasure=Plugin\nPlugin=Battery\nMeasureType=BatteryStatusNumeric\n\n; Measure for Charge Status as text (e.g., Charging, Discharging)\n[MeasureBatteryChargeStatus]\nMeasure=Plugin\nPlugin=Battery\nMeasureType=BatteryChargeStatus\n\n; Measure for Charge Status in Numeric form (1 if Charging, 0 otherwise)\n[MeasureBatteryChargeStatusNumeric]\nMeasure=Plugin\nPlugin=Battery\nMeasureType=BatteryChargeStatusNumeric\n\n; Measure for Battery Name\n[MeasureBatteryName]\nMeasure=Plugin\nPlugin=Battery\nMeasureType=BatteryName\n\n; Measure for Battery ID\n[MeasureBatteryID]\nMeasure=Plugin\nPlugin=Battery\nMeasureType=BatteryID\n\n; Display Battery Percentage\n[BatteryPercentageDisplay]\nMeter=String\nMeasureName=MeasureBatteryPercentage\nText=Battery Percentage: %1%\nFontSize=#FontSize#\nFontColor=#FontColor#\nFontFace=#FontFace#\nX=10\nY=10\n\n; Display Battery Status as Text\n[BatteryStatusDisplay]\nMeter=String\nMeasureName=MeasureBatteryStatus\nText=Battery Status: %1\nFontSize=#FontSize#\nFontColor=#FontColor#\nFontFace=#FontFace#\nX=10\nY=40\n\n; Display Battery Status as Numeric\n[BatteryStatusNumericDisplay]\nMeter=String\nMeasureName=MeasureBatteryStatusNumeric\nText=Battery Status (Numeric): %1\nFontSize=#FontSize#\nFontColor=#FontColor#\nFontFace=#FontFace#\nX=10\nY=70\n\n; Display Charge Status as Text\n[BatteryChargeStatusDisplay]\nMeter=String\nMeasureName=MeasureBatteryChargeStatus\nText=Charge Status: %1\nFontSize=#FontSize#\nFontColor=#FontColor#\nFontFace=#FontFace#\nX=10\nY=100\n\n; Display Charge Status as Numeric\n[BatteryChargeStatusNumericDisplay]\nMeter=String\nMeasureName=MeasureBatteryChargeStatusNumeric\nText=Charge Status (Numeric): %1\nFontSize=#FontSize#\nFontColor=#FontColor#\nFontFace=#FontFace#\nX=10\nY=130\n\n; Display Battery Name\n[BatteryNameDisplay]\nMeter=String\nMeasureName=MeasureBatteryName\nText=Battery Name: %1\nFontSize=#FontSize#\nFontColor=#FontColor#\nFontFace=#FontFace#\nX=10\nY=160\n\n; Display Battery ID\n[BatteryIDDisplay]\nMeter=String\nMeasureName=MeasureBatteryID\nText=Battery ID: %1\nFontSize=#FontSize#\nFontColor=#FontColor#\nFontFace=#FontFace#\nX=10\nY=190\n```\n\n### Skin Details\n- The skin retrieves various battery-related information from the plugin.\n- The skin updates every second (`Update=1000`), but you can adjust the frequency as needed.\n- The `FontColor`, `FontSize`, and `FontFace` can be easily customized via the `[Variables]` section.\n\n## Contributing\n\nFeel free to fork the repository, make changes, and submit pull requests! Any improvements, bug fixes, or additional features are welcome.\n\n### License\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Troubleshooting\n\n- **No Battery Detected**: Ensure your system has a battery or check if WMI is accessible.\n- **Unknown Battery Information**: The plugin may return `\"Unknown\"` if it cannot find any battery information from WMI.\n\n## Credits\n\n- This plugin uses WMI (Windows Management Instrumentation) for battery data retrieval.\n- Special thanks to [Rainmeter](https://www.rainmeter.net/) for creating the Rainmeter platform.\n\n## Contact\nIf you have any questions or suggestions, feel free to open an issue .\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnstechbytes%2Fbattery","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnstechbytes%2Fbattery","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnstechbytes%2Fbattery/lists"}