{"id":18423472,"url":"https://github.com/wabri/i3battery","last_synced_at":"2025-04-07T15:32:45.260Z","repository":{"id":136039751,"uuid":"182794301","full_name":"Wabri/i3battery","owner":"Wabri","description":"A lightweight and simple battery notifier and warning for linux","archived":true,"fork":false,"pushed_at":"2019-11-23T16:17:27.000Z","size":503,"stargazers_count":3,"open_issues_count":3,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-16T07:41:49.346Z","etag":null,"topics":["battery","battery-notifier","battery-warning","i3","i3battery","i3wm","linux","manage","warning"],"latest_commit_sha":null,"homepage":"","language":"Python","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/Wabri.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2019-04-22T13:34:24.000Z","updated_at":"2023-04-26T13:30:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"afd4380a-c911-451b-8a60-83f29de5574c","html_url":"https://github.com/Wabri/i3battery","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wabri%2Fi3battery","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wabri%2Fi3battery/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wabri%2Fi3battery/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wabri%2Fi3battery/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Wabri","download_url":"https://codeload.github.com/Wabri/i3battery/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247679878,"owners_count":20978150,"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-notifier","battery-warning","i3","i3battery","i3wm","linux","manage","warning"],"created_at":"2024-11-06T04:37:24.042Z","updated_at":"2025-04-07T15:32:45.248Z","avatar_url":"https://github.com/Wabri.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# i3battery\n\n[![CircleCI](https://circleci.com/gh/Wabri/i3battery.svg?style=svg)](https://circleci.com/gh/Wabri/i3battery)\n\n![LOGO](resources/LOGO.png)\n\nI made this script for my configuration of [i3wm](i3wm.org) because in this distro there isn't a battery warning notifier.\n\nThis script regularly checks your battery charge and shows a warning in a text notify and if abilitate also an audio warning if you are about to completely drain your battery.\n\n## Install\n\nYou need to clone the repository with:\n\n```bash\ngit clone https://github.com/Wabri/i3battery\n```\n\nThen move into i3battery directory:\n\n```bash\ncd i3battery\n```\n\nAnd finally run and install i3battery:\n\n```Bash\n./install.sh\n```\n\nTry to run the help command:\n\n```Bash\ni3battery --help\n```\n\nIf this return the commands list you can use than the i3battery is installed and you can use it.\n\nTo test notifications and audio you can use the arguments test:\n\n```bash\ni3battery --test-notify --test-audio\n```\n\n## Configurations\n\nThere are some arguments that you can use to change the configuration:\n\n* **`--audio`** to abilitate audio (default=disable)\n* **`--audio_path=\u003cpath_to_audio_directory\u003e`** to specify the audio directory (default=.config/i3battery/audio/)\n* **`--no-notify`** to disabilitate notifications (default=abilitate)\n* **`--wt=\u003cwt1\u003e,\u003cwt2\u003e,\u003cwt3\u003e`** to set the warning threshold to different values (default=20,15,5)\n* **`--time=\u003cvalue\u003e`** to define the time of cycle (default=20)\n* **`--power-path=\u003cvalue\u003e`** to specify the path of the system class power supply (default=/sys/class/power_supply/)\n* **`--bat=\u003cvalue\u003e`** to specify the battery you want to use (default=BAT0)\n\nHere is an example:\n\n```bash\ni3battery --audio --audio-path=/home/wabri/.config/i3battery/audio/ --wt=77,78,76 --time=7 --power-path=/sys/class/power_supply/ --bat=BAT0\n```\n\nThe default audio warning is installed on `~/.config/i3battery/audio/`, you can change by override the files inside it (Warning: need to be wav files):\n\n* `warning.wav` -\u003e use when reach one of the threshold\n* `plug-in.wav` -\u003e use when the adapter goes online\n* `plug-out.wav` -\u003e use when the adapter goes offline\n\n## I3 users\n\nTo use this on i3wm you need to append to your i3 config file this line:\n\n```i3wm\nexec --no-startup-id i3battery\n```\n\nThe most common use is audio without notifications:\n\n```i3wm\nexec --no-startup-id i3battery --audio --no-notify\n```\n\nYou can configure the running with the configurations below.\n\n## How to make sure the used battery is the right one\n\nExecute this command on terminal:\n\n```Bash\nls /sys/class/power_supply/ | grep \"BAT\"\n```\n\nThis can have multiple output:\n\n1. The output is not null and return only the **BAT0** string, you don't need to do anything else and you can use the script as is.\n2. You have more than one batteries the output will be something like this:\n\n    ```Bash\n    BAT0 BAT1 BAT2\n    ```\n\n    In this case you need to specify what battery you want to use for this script by adding this argument:\n\n    ```Bash\n    i3battery --bat=BAT2\n    ```\n\n3. You have no output, this is the hard one. Maybe your power supply are stored in other path, than you need to find it and add the argument for that path:\n\n    ```Bash\n    i3battery --power-path=/sys/class/power_supply/\n    ```\n\n    Make sure to use the right battery even in this case (e.g. BAT1, BAT0)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwabri%2Fi3battery","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwabri%2Fi3battery","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwabri%2Fi3battery/lists"}