Git Product home page Git Product logo

goblocks's Introduction

Goblocks

Goblocks is a fast, lightweight i3status replacement written in Go, using the Go-i3barjson library to communicate with i3bar.

The main goal of this project is to have all of the status indicator modules written in pure Go with minimal reliance on external processes. This will keep Goblocks fast and lightweight, allowing the user to configure Goblocks with a very high update frequency without fear of taking up excessive system resource and battery.

Features

  • Status indicators for:
    • XKB toggled keys (caps lock, num lock, etc.)
    • ZFS status
    • RAID status (mdraid only)
    • filesystem usage
    • system load
    • memory availability
    • CPU temperature
    • network interfaces
    • wifi signal strength
    • battery level
    • volume (ALSA only)
    • uptime
    • date/time
  • Configuration in YAML format (see config/goblocks-full.yml).
  • Color support.
  • Ability to configure separate refresh intervals for each individual block.
  • Ability to configure UNIX signal handlers to refresh individual blocks.
  • Ability to reload the configuration by sending the HUP signal (e.g. pkill -HUP goblocks).
  • Debug option to pretty-print Goblocks' JSON output.

Below is an example of what the configuration at config/goblocks-screenshot.yml might look like:

screenshot-normal

This is an example of what a block that's gone critical might look like:

screenshot-alert

Install

Gobocks requires Go version 1.7+.

Arch users can install Goblocks using the Goblocks AUR package.

Goblocks can also be installed manually with the following commands:

go get github.com/davidscholberg/goblocks
mkdir -p $HOME/.config/goblocks
cp $GOPATH/src/github.com/davidscholberg/goblocks/config/goblocks-full.yml $HOME/.config/goblocks/goblocks.yml

Optional dependecies

The following status indicators have additional dependencies:

  • volume
    • requires the amixer utility
  • zfs
    • requires the zpool utility

Configure

Goblocks configuration is specified in YAML. The configuration file path is $HOME/.config/goblocks/goblocks.yml. A full configuration example with all available block types and options can be found at config/goblocks-full.yml.

Run

To use Goblocks in your i3bar, add the Goblocks binary to the bar section of your i3 config. Note that if $GOPATH/bin/ is not in your $PATH variable, then you'll have to specify the full path to the Goblocks binary.

You can reload Goblocks' configuration without restarting i3 by sending the HUP signal to Goblocks:

pkill -HUP goblocks

You can debug Goblocks' output by running it on the command line. If you set the debug config option to true, then Goblocks will pretty-print the JSON output, making it easier to read.

Contributing

If you would like to see a new feature or enhancement in Goblocks, please feel free to submit an issue or pull request.

TODO

  • Add software update block.
  • Update README with instructions for adding modules.

goblocks's People

Contributors

davidscholberg avatar magicrazy avatar zdykstra 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.