All Projects → amagura → zelda-battery

amagura / zelda-battery

Licence: Apache-2.0 License
A Legend of Zelda inspired health-bar battery meter for the CLI and GUI

Programming Languages

c
50402 projects - #5 most used programming language
M4
1887 projects
Makefile
30231 projects
C++
36643 projects - #6 most used programming language
python
139335 projects - #7 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to zelda-battery

PureBatteryAnalytics
This is a repository for Pure Battery Analytics. Both the System Tray Add-on & Main Application.
Stars: ✭ 46 (+109.09%)
Mutual labels:  battery, battery-monitor
powir
Powir is a Windows 10 based tool to monitor and analyze your system's power and battery usage.
Stars: ✭ 119 (+440.91%)
Mutual labels:  battery, battery-monitor
bat
Battery management utility for Linux laptops.
Stars: ✭ 107 (+386.36%)
Mutual labels:  battery, battery-monitor
battery
Draw battery unicode art written by Go
Stars: ✭ 66 (+200%)
Mutual labels:  battery
ATtiny85-TinyCharger
Single-Cell Li-Ion Battery Charger with Monitoring
Stars: ✭ 20 (-9.09%)
Mutual labels:  battery
UniRate
Unity plugin to easily manage the application frame rate and rendering interval. Preventing battery power consumption and device heat, especially on mobile platforms.
Stars: ✭ 26 (+18.18%)
Mutual labels:  battery
LawRun
Kernel source code (LawRun Kernel) for xiaomi sdm845 | Pocophone f1 (beryllium), Mi 8 (dipper), Mi Mix 2s (polaris) | You can fork and enjoy.
Stars: ✭ 22 (+0%)
Mutual labels:  battery
ex-nihilo
Show battery status on macOS
Stars: ✭ 13 (-40.91%)
Mutual labels:  battery
youtube-audio
Disable videos on youtube and save battery and bandwidth / data
Stars: ✭ 110 (+400%)
Mutual labels:  battery
battery-status-progressive-web-app
Progressive Web App (PWA) https://irekrog.github.io/battery-status-progressive-web-app/
Stars: ✭ 17 (-22.73%)
Mutual labels:  battery
swaystatus
A minimal executable for displaying sway status per second
Stars: ✭ 14 (-36.36%)
Mutual labels:  battery
lovelace-battery-entity-row
Show battery states or attributes with dynamic icon on entity rows in Home Assistant's Lovelace UI
Stars: ✭ 49 (+122.73%)
Mutual labels:  battery
Sensors
A macOS application displaying the thermal, voltage and current sensor values.
Stars: ✭ 70 (+218.18%)
Mutual labels:  battery
expfactory
software to generate a reproducible container with a battery of experiments
Stars: ✭ 29 (+31.82%)
Mutual labels:  battery
zeldaPlay
A Single Page Application to help zeldaPlay players to track their characters and progress
Stars: ✭ 95 (+331.82%)
Mutual labels:  zelda
react-sheikah-ui
React component library based on The Legend of Zelda: Breath of the Wild game
Stars: ✭ 45 (+104.55%)
Mutual labels:  zelda
smbusb
USB SMBus Interface
Stars: ✭ 93 (+322.73%)
Mutual labels:  battery
KISS Battery Monitor
Open TX Telemetry Script to support KISS 24a telemetry data callouts
Stars: ✭ 19 (-13.64%)
Mutual labels:  battery
tesla powerwall
Python API for Tesla Powerwall
Stars: ✭ 43 (+95.45%)
Mutual labels:  battery
batify
Only one udevrule file triggering plug and critical battery level notifications (multi-x sessions support)
Stars: ✭ 47 (+113.64%)
Mutual labels:  battery

ZBatt Build Status Circle CI

A Legend of Zelda inspired health-bar battery meter for Shell prompts and Taskbars

Supported Platforms

Linux

Kernels >= 2.6.24 are supported; support for older kernels is not a priority.

UNIX

BSD is well supported; as long as you have sysctlbyname you should be fine.

Solaris support is still fairly new and experimental, but as long as you have sys/pm.h you should be good.

UNIX systems supported:

  • DragonFlyBSD
  • FreeBSD
  • OpenIndiana (Solaris)

UNIX systems probably supported:

  • NetBSD
  • Midnight BSD
  • OpenSolaris
  • (Anything based on FreeBSD)

UNIX systems unsupported:

  • OpenBSD
  • SmartOS (Solaris)

Windows

Windows XP and later.

Runtime Dependencies

Linux and UNIX

  • Python (GUI)
  • GTK+3 (GUI)
  • PyGObject (GUI)

† Python v2.x.xx is no longer supported
‡ Support for GTk+2 might be added back in future releases

Windows

Windows provides everything you'll need.

Make Dependencies

  • GNU Autotools (i.e. automake, autoconf)
  • Make

Linux and UNIX

  • C99 compliant C compiler
  • Cython (GUI)
  • pkgconf (GUI)

Windows

  • C++11 compliant C++ compiler

Building

  1. autoreconf -fi
  2. ./configure
  3. make

Installing

  1. make DESTDIR="<DIR>" install

If the install fails because of permissions, try running it with sudo.


Alternatively, you can also just place the binaries zbatc, zbatt, and (if you built the GUI) gzbatt where ever you like.

Examples

The command-line is extremely flexible, so while there are defaults there's nothing stopping you from defining your own experience.

Git-esque

example of the git style

./zbatc -c 32; ./zbatt -r -f +; ./zbatc -c 31; ./zbatt -x -e -

To make it even easier to integrate ZBatt with your current command-line experience, I've gone ahead and provided examples for some shells.

Zsh

example showing zelda-battery in a Zsh prompt

PROMPT="%{$(./zbatc)%}$(./zbatt)%{�[0;0m%} %m%# "

## run TRAPALRM every $TMOUT seconds
TMOUT=60 # refresh the terminal prompt every 60 seconds

TRAPALRM ()
{
    zle reset-prompt # refreshs the terminal prompt
}

Bash

example showing zelda-battery in a Bash prompt

PS1='\[$(./zbatc)\]$(./zbatt)\[\033[0;0m\] [\h \W]\$ '

Mksh (Korn Shell)

example showing zelda-battery in a Mksh prompt

PS1=$'$(./zbatc)'$(./zbatt)$'\033[0;0m'\ ["$(hostname)"]\

Tcsh

example showing zbatt in a tcsh prompt

set prompt="%{`./zbatc`%}`./zbatt` %{\033[0;0m%}%m "

Notes

Zsh

As long as you use the TMOUT and TRAPALRM/zle reset-prompt stuff, your Zsh prompt should refresh itself every 60 seconds.

Bash

AFAIK there is no way to periodically refresh a bash prompt without either running clear/Ctrl-L or pressing enter, which causes the prompt to be redrawn.

Submissions

Screenshot, command-line prompt examples, and all other submissions are appreciated as always. Thank you.

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].