{"id":20166175,"url":"https://github.com/utkarsh2102/batalert","last_synced_at":"2025-04-10T01:20:29.719Z","repository":{"id":62554025,"uuid":"266542748","full_name":"utkarsh2102/batalert","owner":"utkarsh2102","description":"Battery notifications/alerts for your favorite WM! 💯","archived":false,"fork":false,"pushed_at":"2022-10-12T01:32:47.000Z","size":31,"stargazers_count":8,"open_issues_count":3,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T03:01:41.394Z","etag":null,"topics":["battery","hacktoberfest","linux","ruby","ruby-application","window-manager","wm"],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/utkarsh2102.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":"2020-05-24T13:06:45.000Z","updated_at":"2023-11-13T21:09:43.000Z","dependencies_parsed_at":"2022-11-03T04:45:42.975Z","dependency_job_id":null,"html_url":"https://github.com/utkarsh2102/batalert","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/utkarsh2102%2Fbatalert","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/utkarsh2102%2Fbatalert/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/utkarsh2102%2Fbatalert/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/utkarsh2102%2Fbatalert/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/utkarsh2102","download_url":"https://codeload.github.com/utkarsh2102/batalert/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247657271,"owners_count":20974346,"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","hacktoberfest","linux","ruby","ruby-application","window-manager","wm"],"created_at":"2024-11-14T00:42:49.446Z","updated_at":"2025-04-10T01:20:29.697Z","avatar_url":"https://github.com/utkarsh2102.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# batalert\n\n`batalert` (aka *Battery Alert*) is a tool, written in Ruby, to notify the users when their battery is either under-charged (default: \u003c 10%) or over-charged (default: \u003e 90%).  \n\n\u003e notify the users when their battery is either under-charged (default: \u003c 10%) or over-charged (default: \u003e 90%).  \n\nEver ran out of battery whilst in the middle of work?  \nWell, say no more! `batalert` has got you covered!  \nJust consider installing it and put it on cron so that you never have to worry about running out of battery in midst of your work! Isn't that...amazing? 🚀  \n\nThis is originally intended for [WM](https://en.wikipedia.org/wiki/Window_manager) users who don't get battery notifications by default, but can be used by everyone who sees its worth!\n\n\u003e How does it work?\n\nBatlalert upon being set up, shall notify you when to put your battery on charging and when to unplug it too. Whilst notifying so, it also numerically mentions your battery percentage at that particular moment.\n\n## Setting up `batalert`  \n\n#### Ways of installation:  \n\n- Install the [gem](https://rubygems.org/gems/batalert) from the [rubygems](https://rubygems.org/) archive:  \n  `$ gem install batalert`  \n\n- Install the [package](https://tracker.debian.org/pkg/batalert) via apt (only for Debian Sid and Bullseye):   \n  `$ sudo apt install batalert`\n\n- Download the deb and install it manually:  \n  The [release page](https://github.com/utkarsh2102/batalert/releases) has a .deb binary which can be downloaded with a single click. Once done, run:  \n `$ sudo dpkg -i \u003cpath-to-deb\u003e/batalert_\u003cversion\u003e_all.deb`\n\n#### Ways of setting it as a cron job:\n\n- Set it up manually:  \n  `$ crontab -e`\n\n  And then add a line in the following format at the end:  \n  `*/n * * * * /usr/bin/batalert`\n\n  **NOTE**: `n` is the duration of interval (in minutes) after which the binary is executed. So, for instance, if you want to schedule a cron after every 15 minutes (that's what I do), then the line becomes:  \n  `*/15 * * * * /usr/bin/batalert`\n\n- Use [whenever](https://www.rubyguides.com/2019/04/ruby-whenever-gem/) to schedule the cron automatically on your behalf:  \n(you can install `whenever` via `gem install whenever` or `apt install ruby-whenever`)  \n   - Clone this repository:  \n     `$ git clone https://github.com/utkarsh2102/batalert.git`  \n    - Move to its directory:  \n      `$ cd batalert`  \n    - Set the value of interval in `config/schedule.rb`.\n    - Run `whenever` to schedule the cron:  \n      `$ whenever --update-crontab`\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies.  \nThen, run `rake` to run the tests.  \nYou can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`.  \nTo release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nAs always, bug reports and pull requests are heartily welcomed! 💖  \nBatalert project is a safe and welcoming space for collaboration.\n\n## License\n`batalert` is available as a Free Software under the [MIT](https://github.com/utkarsh2102/batalert/blob/master/LICENSE) license.  \nCopyright © 2020 Utkarsh Gupta\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Futkarsh2102%2Fbatalert","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Futkarsh2102%2Fbatalert","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Futkarsh2102%2Fbatalert/lists"}