{"id":15007509,"url":"https://github.com/meysampg/battery_notifier","last_synced_at":"2025-10-03T16:31:23.840Z","repository":{"id":64302832,"uuid":"144108296","full_name":"meysampg/battery_notifier","owner":"meysampg","description":"Send an alarm to notification daemon if battery percentage become lower than a threshould","archived":true,"fork":false,"pushed_at":"2023-02-05T16:44:37.000Z","size":30,"stargazers_count":18,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-16T23:22:56.942Z","etag":null,"topics":["battery-percentage","go","linux-app","notification"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/meysampg.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}},"created_at":"2018-08-09T06:10:55.000Z","updated_at":"2024-11-14T01:48:00.000Z","dependencies_parsed_at":"2023-02-19T00:40:22.481Z","dependency_job_id":null,"html_url":"https://github.com/meysampg/battery_notifier","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meysampg%2Fbattery_notifier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meysampg%2Fbattery_notifier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meysampg%2Fbattery_notifier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meysampg%2Fbattery_notifier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/meysampg","download_url":"https://codeload.github.com/meysampg/battery_notifier/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235155967,"owners_count":18944822,"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-percentage","go","linux-app","notification"],"created_at":"2024-09-24T19:10:30.827Z","updated_at":"2025-10-03T16:31:23.501Z","avatar_url":"https://github.com/meysampg.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Battery Notifier :battery:\nThis is a simple application to show current battery status (percentage and charging status). It can also watch the battery continuously and send periodic desktop notifications when the battery goes below a threshold percentage.\n\n## Development\nClone `https://github.com/meysampg/battery_notifier` and run `go mod vendor`.\n\n## Options :construction_worker:\n* `-v`: show application version.\n\n* `-t`: battery percentage threshold, below which the battery will be condiered as *low* and the user will start getting desktop notifications about low battery.\n\n* `-l`: battery check interval during low (\u003c threshold) battery.\n\n* `-n`: battery check interval during good/normal (\u003e threshold) battery.\n\n* `-w`: continuously watch battery level at preset interval. The interval depends on values of '-n' and '-l'.\n\n* `-p`: show the remaining percentage of the battery and exit.\n\n* `-h`: get help message and default values of flags/options.\n\n## Creating a *Systemd Service* to keep watching battery even across reboots\n* Copy the executable to /usr/local/bin/\n\n* Create a systemd service unit file like below:\n```\n$ cat /lib/systemd/system/battery-notifier.service \n[Unit]\nDescription=System Battery Monitor and Notifier\nAfter=multi-user.target\n\n[Service]\nUser=\u003cnormal system username but not root\u003e\nExecStart=/usr/local/bin/battery_notifier -w\nRestart=on-failure\nRestartSec=30s\n\n[Install]\nWantedBy=multi-user.target\n```\n\n* Save the above file and perform the following to always start the battery-notifier service:\n```\n$ sudo systemctl daemon-reload\n$ sudo systemctl start battery-notifier\n$ sudo systemctl enable battery-notifier\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeysampg%2Fbattery_notifier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmeysampg%2Fbattery_notifier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeysampg%2Fbattery_notifier/lists"}