clark

command module
v0.0.0-...-bf74b40 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 7, 2019 License: GPL-2.0 Imports: 7 Imported by: 0

README

Clark

Clark is a daemon implementing the i3bar protocol.

Docs: godoc

Build: CircleCI

Overview

Clark implements 100% of the i3bar protocol, including click events.

Clark implements all the vanilla blocks we would expect in a status bar:

  • Battery Status/Charge Percentage
  • Cpu loads
  • Memory Usage
  • Network I/O
  • Clock

Clark has no configuration files and is designed to be small and hackable. It has a suckless style config.h (conf/conf.go) and (colors/colors.go).

Clark has an asynchronous architecture.

  • Strictly one goroutine per block
  • Click events are handled in the same goroutine as block writing

Install

To install clark

$ go get github.com/jameswelchman/clark

This should clone this repo and build a clark binary. See documentation about go get for more details. It probably installed clark to $HOME/go/bin/clark.

Debugging

All errors are written to stderr. This is a snippet from my i3 config. Note the commented out line.

bar {
   status_command /home/james/go/bin/clark
   # status_command /home/james/bin/clark_debug.sh
}

And the contents of /home/james/bin/clark_debug.sh.

#!/usr/bin/env bash

/home/james/go/bin/clark 2> /tmp/clark_error.log

TODO

  1. ArchLinux pacman block
  2. i3 current-window and current-layout block
  3. PulseAudio block

Documentation

Overview

clark is a daemon implementing the i3bar protocol.

Directories

Path Synopsis
blocks is the parent package to all block implementations.
blocks is the parent package to all block implementations.
battery
battery implements a battery monitor.
battery implements a battery monitor.
clock
clock is a package implementing a clock display on i3bar
clock is a package implementing a clock display on i3bar
cpu
wifi/wifibytes
wifibytes is a package for calculating the number of kilobits per seconds are going over a given network interface.
wifibytes is a package for calculating the number of kilobits per seconds are going over a given network interface.
clarkio implements the bottom layer for both sending and receiving messages to i3bar.
clarkio implements the bottom layer for both sending and receiving messages to i3bar.
colors defines the colors used in Block messages.
colors defines the colors used in Block messages.
conf is where global configuration may be set.
conf is where global configuration may be set.
pkg
bat
bat implemnts functions for parsing the files in /sys/class/power_supply/BAT0 It furthermore has some utility functions for doing percentage calculations.
bat implemnts functions for parsing the files in /sys/class/power_supply/BAT0 It furthermore has some utility functions for doing percentage calculations.
cpu
cpu will examine /proc/stat to estimate how busy the CPU is.
cpu will examine /proc/stat to estimate how busy the CPU is.
memory
memory implemnts a function for reading /proc/meminfo.
memory implemnts a function for reading /proc/meminfo.
protocol is the specification of the i3bar protocol.
protocol is the specification of the i3bar protocol.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL