Giter Site home page Giter Site logo

juantascon / i3blocks Goto Github PK

View Code? Open in Web Editor NEW

This project forked from vivien/i3blocks

0.0 2.0 0.0 440 KB

A flexible scheduler for your i3bar blocks

Home Page: http://vivien.github.io/i3blocks

License: GNU General Public License v3.0

Makefile 3.21% C 69.85% Shell 21.81% Perl 5.13%

i3blocks's Introduction

i3blocks

Build Status Join the chat at https://gitter.im/vivien/i3blocks

i3blocks is a highly flexible status line for the i3 window manager. It handles clicks, signals and language-agnostic user scripts.

The content of each block (e.g. time, battery status, network state, ...) is the output of a command provided by the user. Blocks are updated on click, at a given interval of time or on a given signal, also specified by the user.

It aims to respect the i3bar protocol, providing customization such as text alignment, urgency, color, and more.


Here is an example of status line, showing the time updated every 5 seconds, the volume updated only when i3blocks receives a SIGRTMIN+1, and click events.

[volume]
label=Volume:
command=amixer get Master | grep -E -o '[0-9]{1,3}?%' | head -1
interval=once
signal=1
# use 'pkill -RTMIN+1 i3blocks' after changing the volume

[time]
command=date '+%D %T'
interval=5

[clickme]
full_text=Click me!
command=echo button=$BLOCK_BUTTON x=$BLOCK_X y=$BLOCK_Y
min_width=button=1 x=1366 y=768
align=left

You can use your own scripts, or the ones provided with i3blocks. Feel free to contribute and improve them!

The default config will look like this:

The scripts provided by default may use external tools:

  • mpstat (often provided by the sysstat package) used by cpu_usage.
  • acpi (often provided by a package of the same name) used by battery.

The user contributed scripts may also use external tools:

  • playerctl (available here) used by mediaplayer.
  • sensors (often provided by the lm-sensors package) used by temperature.

Documentation

For more information about how it works, please refer to the manpage.

You can also take a look at the i3bar protocol to see what possibilities it offers you.

Take a look at the wiki for examples of blocks and screenshots. If you want to share your ideas and status line, feel free to edit it!

Installation

i3blocks may already be packaged for your distribution:

Or you may install i3blocks from source:

$ git clone git://github.com/vivien/i3blocks
$ cd i3blocks
$ make clean debug # or make clean all
# make install

Note: the generation of the manpage requires the ronn utility, packaged in common distributions as ruby-ronn.

Usage

  • Set your status_command in a bar block of your i3 config file:

    bar {
      status_command i3blocks
    }
    
  • For customization, copy the default i3blocks.conf into ~/.i3blocks.conf (e.g. cp /etc/i3blocks.conf ~/.i3blocks.conf)

  • Restart i3 (e.g. i3-msg restart)

Copying

i3blocks is Copyright (C) 2014 Vivien Didelot
See the file COPYING for information of licensing and distribution.

i3blocks's People

Contributors

acrisci avatar airblader avatar anlutro avatar deimosfr avatar dinduks avatar eepp avatar fridim avatar gitter-badger avatar jbonjean avatar jpleau avatar kaueraal avatar kb100 avatar mhcerri avatar or avatar pink-mist avatar revan avatar roobre avatar setzer22 avatar thor avatar timp3289 avatar valeriangalliat avatar vivien avatar

Watchers

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