Giter Club home page Giter Club logo

i3-energy-tracker's Introduction

I3 blocks kW/h price for energy

Provides a script for showing how much energy costs right now. This is done using the Enrgi West API. It returns the price for the current hour and stores it in a JSON object. Maybe changing it later to be a SQLite database.

Example

2022-08-26T07:54:32 CEST

Using

Clone the repo into your i3blocks folder (typically ~/.config/i3blocks/ or ~/.config/i3blocks/scripts). Then add the block below into your config file:

[Energy]
markup=pango
command=~/.config/i3blocks/i3-energy-tracker/main.py now
background=#000000
interval=600

refresh your i3 bar (alt+shift+r)

Todo:

Some todo items:

  • Pick some better colors for the block (Maybe use RGBA?).
  • Add configuration for selecting ranges.
    • Add cli configuration for cutoffs (setting COLOR_MIN and COLOR_MAX via cli).
    • Add a setting for selecting coloring based on percentage of highest and lowest price for the day.
  • Add an on click event that shows a table of prices for the whole day.
    • Write the pango element code.
    • Get it to show with Rofi.
    • Make the on click event + Rofi work.
  • Add support for selecting more markets (eg. Denmark Eastern Market or custom variable ones.)
    • Added in a comment thje east market price data.
    • Add a check so that the JSON file is the correct market data if you switch.

i3-energy-tracker's People

Contributors

hszdev avatar

Stargazers

Lungoupao Khongsai avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.