eufon/blinkenlicht
Daniel Barlow b0fe8e1dff update only when interval requires it 2022-04-26 21:25:41 +01:00
..
README.md update only when interval requires it 2022-04-26 21:25:41 +01:00
bl.fnl initial checkin 2022-04-26 21:25:40 +01:00
blinkenlicht.fnl update only when interval requires it 2022-04-26 21:25:41 +01:00
default.nix add layer-shell, todo list 2022-04-26 21:25:40 +01:00
shell.nix initial checkin 2022-04-26 21:25:40 +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.

Plan

  • use gtk-layer-shell to put it in a layer
  • [] update only at relevant intervals
  • [] do we need file poll support? prolly not if we're calling every 200ms
  • [] cache icon pixbufs
  • [] update image/label widget instead of destroying
  • [] allow height customisation
(bar
 {
  :anchor [:top :right]
  :orientation :horizontal
  :indicators
  [
   (indicator {
               :interval 200
               :icon #(if (> loadavg 2) "sad-face" "happy-face")
               })
   (let [f (io.open "/tmp/statuspipe" "r")]
     (indicator {
                 :poll [f]
                 :text #(f:read:sub 1 10)
                 }))
   (indicator {
               :interval 5000
               :text #(.. (disk-free-percent "/") "%")
               :on-click #(spawn "baobab")
               })
   (indicator {
               :interval 1000
               :text #(os.date "%X")
               })
   ]})