{"id":18564285,"url":"https://github.com/notashelf/batmon","last_synced_at":"2025-11-01T13:30:33.442Z","repository":{"id":216143999,"uuid":"740573146","full_name":"NotAShelf/batmon","owner":"NotAShelf","description":"Dead-simple battery monitor for Linux.","archived":false,"fork":false,"pushed_at":"2025-01-08T08:38:24.000Z","size":2354,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-08T09:24:59.510Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NotAShelf.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-01-08T16:10:54.000Z","updated_at":"2025-01-08T08:38:27.000Z","dependencies_parsed_at":"2024-01-12T00:21:30.132Z","dependency_job_id":"08318947-7787-4243-b353-fb79cbf8e2c0","html_url":"https://github.com/NotAShelf/batmon","commit_stats":{"total_commits":8,"total_committers":1,"mean_commits":8.0,"dds":0.0,"last_synced_commit":"6221a470a38a29619b8138fc0ce341bf04a51109"},"previous_names":["notashelf/batmon"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NotAShelf%2Fbatmon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NotAShelf%2Fbatmon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NotAShelf%2Fbatmon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NotAShelf%2Fbatmon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NotAShelf","download_url":"https://codeload.github.com/NotAShelf/batmon/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239293949,"owners_count":19615043,"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":[],"created_at":"2024-11-06T22:14:46.416Z","updated_at":"2025-11-01T13:30:33.398Z","avatar_url":"https://github.com/NotAShelf.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🔋 Batmon\n\nDead-simple, somewhat configurable battery monitor for Linux. Batmon monitors\nthe battery path in real time and adjusts your power profiles accordingly to\noptimize battery life for e.g. laptops.\n\n## Features\n\n- Real-time monitoring of battery status\n- Dynamic adjustment of power profiles\n- Simple configuration though JSON configuration file\n  - Optional command execution on state changes\n\n## Installation\n\n### Prerequisites\n\n- Upower\n- powerprofilesctl\n- Nix or Go\n\n### Nix\n\nYou are strongly encouraged to get Batmon through Nix, using the flake located\nin this repository. You may install it manually on non-NixOS systems using\n`nix profile install`.\n\n```bash\nnix profile install github:NotAShelf/batmon\n```\n\nOr on NixOS systems using the package exposed for your system.\n\n```nix\n{inputs, pkgs, ...}: {\n  environment.systemPackages = [\n    inputs.batmon.packages.${pkgs.stdenv.system}.default\n  ];\n}\n```\n\nAlternatively, using the NixOS _module_ to install Batmon and configure a\nsystemd service for you.\n\n```nix\n{inputs, pkgs, ...}: {\n  imports = [inputs.batmon.nixosModules.default];\n  services.batmon.enable = true;\n}\n```\n\n### Manually\n\n```console\ngo install . # this will install Batmon in your $GOPATH\n```\n\nStart Batmon through your terminal, or as a systemd service.\n\n## Configuration\n\nBy default, Batmon will load the configuration from `config.json` located in the\ncurrent directory. You can specify a different configuration file using the\n`--config` flag:\n\n```console\nbatmon -c /path/to/config.json\n```\n\nThe configuration file should contain a list of batteries to monitor, along with\nany custom commands or extra commands to execute. Here's an example of a\nconfiguration file:\n\n```json\n{\n  \"batPaths\": [\n    {\n      \"path\": \"/sys/class/power_supply/BAT0\",\n      \"command\": \"powerprofilesctl set performance\",\n      \"extraCommand\": \"echo 'Battery is charging' | wall\"\n    }\n  ]\n}\n```\n\n- You can leave `command` empty to use the default behaviour - which will switch\n  active powerprofile using `powerprofiles set performance | balanced`\n\n- `extraCommand`, if provided, will be executed in addition to the `command`\n  value.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnotashelf%2Fbatmon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnotashelf%2Fbatmon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnotashelf%2Fbatmon/lists"}