tshakalekholoane / bat

Licence: MIT license
Battery management utility for Linux laptops.

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to bat

Schematics Utilities
🛠️ Useful exported utilities for working with Schematics
Stars: ✭ 73 (-31.78%)
Mutual labels:  utility, utilities, utils
Utils
A collection of useful PHP functions, mini classes and snippets that you need and can use every day.
Stars: ✭ 750 (+600.93%)
Mutual labels:  utility, utilities, utils
PureBatteryAnalytics
This is a repository for Pure Battery Analytics. Both the System Tray Add-on & Main Application.
Stars: ✭ 46 (-57.01%)
Mutual labels:  battery-level, battery, battery-monitor
timestampy
🕒 Bunch of utilities useful when working with UNIX timestamps
Stars: ✭ 21 (-80.37%)
Mutual labels:  utility, utilities, utils
powir
Powir is a Windows 10 based tool to monitor and analyze your system's power and battery usage.
Stars: ✭ 119 (+11.21%)
Mutual labels:  battery, battery-monitor
diyBMSv4Code
Software for diyBMS v4
Stars: ✭ 128 (+19.63%)
Mutual labels:  battery-monitor, battery-management-system
table2ascii
Python library for converting lists to fancy ASCII tables for displaying in the terminal and on Discord
Stars: ✭ 31 (-71.03%)
Mutual labels:  utilities, utils
RxBatteryManager
A Reactive BatteryManager in Swift for iOS
Stars: ✭ 21 (-80.37%)
Mutual labels:  battery-level, battery-monitor
Bash Utility
Bash library which provides utility functions and helpers for functional programming in Bash.
Stars: ✭ 92 (-14.02%)
Mutual labels:  utility, utils
OrganizeMediaFiles
a collection of Python scripts that help you organize media files into a directory tree "year/month" based on metadata , using exiftool
Stars: ✭ 24 (-77.57%)
Mutual labels:  utilities, utils
gut
🍱 yet another collection of go utilities & tools
Stars: ✭ 24 (-77.57%)
Mutual labels:  utility, utilities
Bbo
bbo is a utility library of zero dependencies for javascript. 🍖🌭🍔
Stars: ✭ 227 (+112.15%)
Mutual labels:  utility, utils
Gitlab Cli
Create a merge request from command line in gitlab
Stars: ✭ 224 (+109.35%)
Mutual labels:  utility, utilities
Util
A collection of useful utility functions
Stars: ✭ 201 (+87.85%)
Mutual labels:  utility, utilities
youtube-unofficial
Access parts of your account unavailable through normal YouTube API access.
Stars: ✭ 33 (-69.16%)
Mutual labels:  utility, utilities
ios
CoThings's iOS application. CoThings is a realtime counter for shared things.
Stars: ✭ 13 (-87.85%)
Mutual labels:  utility, utilities
useful
🇨🇭 A collection of useful functions for working in Elixir
Stars: ✭ 21 (-80.37%)
Mutual labels:  utility, utils
assign-one-project-github-action
Automatically add an issue or pull request to specific GitHub Project(s) when you create and/or label them.
Stars: ✭ 140 (+30.84%)
Mutual labels:  utility, utilities
Goat
POSIX-compliant shell movement boosting hack for real ninjas (aka `cd x` and `cd ...`)
Stars: ✭ 27 (-74.77%)
Mutual labels:  utility, sh
vmutils
cross platform library to manipulate and extract information of memory regions
Stars: ✭ 22 (-79.44%)
Mutual labels:  utility, utilities

bat

NAME
    bat -- battery management utility for Linux laptops 

SYNOPSIS
    bat [-chprst] [-t num]

DESCRIPTION
    The following options are available:

    -c, --capacity  
        Print the current battery level.
    -h, --help      
        Print this help document.
    -p, --persist   
        Persist the current threshold between restarts.
    -r, --reset    
        Undoes the persistence setting of the charging threshold between 
        restarts.
    -s, --status
        Print the charging status.
    -t, --threshold num
        Print the current charging threshold limit.
        If num is specified, which should be a value between 1 and 100, this
        will set a new charging threshold limit.
    -v, --version
        Display version information and exit.

About

The goal is to replicate the functionality of the ASUS Battery Health Charging utility for ASUS laptops on Windows which aims prolong the battery's life-span 1 2.

Disclaimer

This has been reported to work with some ASUS and Lenovo ThinkPad laptops only. For Dell systems, see smbios-utils, particularly the smbios-battery-ctl command, or install it using your package manager. For other manufacturers there is also TLP.

There have also been some problems setting the charging threshold inside of a virtual machine.

Installation

Precompiled binaries (Linux x86-64) are available from the GitHub releases page, the latest of which can be downloaded from here.

After downloading the binary, give it permission to execute on your system by running the following command. For example, assuming the binary is located in the user's Downloads folder:

$ chmod +x $HOME/Downloads/bat

Alternatively, the application can be build from source by running the following Go command.

$ go build ./cmd/bat/

Tip: Place the resulting binary in a directory that is in the $PATH environment variable such as /usr/local/bin/. This will allow the user to execute the program from anywhere on their system.

Another tip: Rename the binary to something else if another program with the same name already exists on your system i.e. bat.

Examples

# Print the current battery charging threshold.
$ bat --threshold

# Set a new charging threshold, say 80%.
# (requires superuser permissions).
$ sudo bat --threshold 80

# Persist the current charging threshold setting between restarts
# (requires superuser permissions).
$ sudo bat --persist

Requirements

Linux kernel version later than 5.4 which is the earliest version to expose the battery charging threshold variable.

To persist the threshold setting between restarts, the application relies on systemd, particularly a version later than 244, and Bash which are bundled with most Linux distributions.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].