Calculates cost of electricity.
Go to file
2023-09-17 22:46:12 +04:00
src Version updated to 1.1.0. 2022-10-07 03:56:15 +04:00
.gitignore kwh-calc renamed to more suitable name kwh-cost. 2021-12-24 23:54:31 +04:00
LICENSE Updated years and an e-mail in LICENSE. 2023-09-17 22:43:54 +04:00
Makefile Added PREFIX in Makefile.Fixed .PHONY. Standard c2x was changed to c99. 2023-09-17 22:46:12 +04:00
PKGBUILD Updated domain, added PREFIX to make, made use of $pkgver. Updated version to 1.1.1. 2023-09-17 22:45:14 +04:00
README.md Version updated to 1.1.0. 2022-10-07 03:56:15 +04:00

kwh-cost

Calculates cost of electricity.

How to use

$ kwh-cost [OPTIONS] price wattage interval [interval ..]

Options are -v, --version to show program's version; and -h, --help to show usage of a program.

price is a price per kWh. wattage is how many Watts being consumed. interval is for how long.

interval is in seconds, but you can specify a unit. Units are the following: m for minutes; h for hours; and d for days. There could be as many intervals passed as you need.

Here is an example:

$ kwh-cost 4.02 120 30d 2h

Will give 348.29.

Installation

Manually

First run make to build a program, and then make install to copy executable in /usr/bin/. Later, use make uninstall to delete it, or just delete /usr/bin/kwh-cost.

For ArchLinux

You can take a PKGBUILD file and in a directory with it run makepkg -i.

If you want to use a pre-built package for Arch from Releases, then install it using pacman -U command.