eufon/blinkenlicht
Daniel Barlow 2f32fac349 merge blinkenlicht, add modeline 2022-04-26 22:13:37 +01:00
..
metric whitespace and comments 2022-04-26 21:25:43 +01:00
README.md standardise interface to metrics 2022-04-26 21:25:43 +01:00
default.nix support svg icons 2022-04-26 21:25:43 +01:00
init.fnl merge blinkenlicht, add modeline 2022-04-26 22:13:37 +01:00
iostream.fnl add "uplink" indicator 2022-04-26 21:25:42 +01:00
modem.fnl whitespace and comments 2022-04-26 21:25:43 +01:00
netlink.nix uplink: use route with lowest metric 2022-04-26 21:25:43 +01:00
shell.nix add indicator for modem status 2022-04-26 21:25:43 +01:00
wifi-1.svg graphical wifi quality display 2022-04-26 21:25:43 +01:00
wifi-2.svg graphical wifi quality display 2022-04-26 21:25:43 +01:00
wifi-3.svg graphical wifi quality display 2022-04-26 21:25:43 +01:00
wifi.svg graphical wifi quality display 2022-04-26 21:25:43 +01:00

README.md

Blinkenlicht

Yet another "bar" program for wlroots-basd Wayland compositors, but this one is written in Fennel and therefore better than all the others because it is more niche.

More seriously: you might prefer this over another status bar program if you want fine-grained control over what is shown in your bar and you are happy to exert that control in a Lua-based Lisp language.

Current status and usage

Not quite dogfood-ready yet, but fast approaching.

  • bl.fnl is an example, using licht.css for its styling

  • blinkenlicht.fnl is the module that parses bar and indicator forms and does all the UI

  • metric/*.fnl is a collection of modules that read metrics (load average, connectivity, battery status etc) from the system, for indicators to display.

Use the default.nix for guidance as to libraries and other setup required - or just use it, of course.

nix-shell
lua $fennel bl.fnl

The funny symbols in bl.fnl are code points that exist only in the "Font Awesome" font, and render to handy icons like "battery, half empty". You need to install Font Awesome to see them; however due to the Gtk font fallback system - at least, that's what I think is doing it - you don't actually need to specify that font in your CSS because Gtk will find it anyway. Magic.

Plan

  • use gtk-layer-shell to put it in a layer
  • update only at relevant intervals
  • cache icon pixbufs
  • add some mechanism for indicators that wait for events instead of polling
  • set indicator background colour (use css for this?)
  • update image/label widget instead of destroying
  • allow image height customisation
  • set poll interval based on indicators' requested intervals
  • allow indicator to change styles based on status
  • add metrics for
    • wireless connected/strength
    • wwan connected/type (hspa, lte, etc)/signal
    • cpu %