Skip to content

i3block for showing the current Danish energy price.

Notifications You must be signed in to change notification settings

hszdev/i3-energy-tracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

i3block for showing the current Danish energy price.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages