ane / tila

A system monitor for X status bar displays (i3, xmobar, dzen2) configurable in Scheme.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tila

travis build status

tila provides system information for the i3 status bar.

NOTE: this is not under active development

A simple configuration looks like this:

(use tila-core)

(tila '((output . i3))       ; configuration
      (element hostname)       ; elements...
      (element date-and-time #:color "red"))

This will print the system hostname and the current date.

Supported elements

hostname

get the system hostname

date-and-time [FMT]

print current date & time. FMT is an optional string in the SRFI-19 format.

say-hello

says hello

load-average [COUNT]

print load average, where COUNT is a number from 1 to 3, specifying how many to print of the 1m, 5m and 15m load averages

Configuration

The top-level tila configuration is created using the tila procedure. tila works by re-printing its information every n seconds. The interval can be defined in the configuration with the interval parameter, it defaults to 5 seconds. Additionally, in the future, elements will support their own custom intervals.

(tila <config> <elements...>)

The config is an association list of the form '((key . value) ...). The following options are available:

  • output
    • i3 (default)
  • color
    • the default color for all elements either a color name or a hex RGB (#00BBCC), defaults to white

The configuration is followed by any number of elements, which are created as follows.

(element <procedure|string> [#:color <color>])

This specifies an element. The procedure is either a zero-parameter function (a thunk) or a string. The procedure is called to generate the output at every iteration. The optional color keyword argument specifies the color used.

Installation

Tila is written in the Chicken Scheme implementation. You need it installed to run tila. Chicken should be available in most Linux package managers.

To build tila, clone this repo and change to its directory and run chicken-install -s. This will put the tila executable in your path. Create the file ~/.tila using the example above.

License

tila is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with tila; see the file LICENSE.md. If not, see http://www.gnu.org/licenses/.

About

A system monitor for X status bar displays (i3, xmobar, dzen2) configurable in Scheme.

License:GNU General Public License v3.0


Languages

Language:Scheme 99.2%Language:Emacs Lisp 0.8%