3 ms·
J3blocks is a Janet scripting system for i3bar and swaybar
- amano-kenji 3y agoFor years, I used i3pystatus, but I was frustrated by the fact that it's not flexible or extensible. I considered using i3blocks, but I didn't like the limitations of its INI-style configuration. I wanted the flexibility of a proper scripting language. Thus, I created https://codeberg.org/amano.kenji/j3blocks https://codeberg.org/amano.kenji/j3blocks which comes with a few built-in modules. j3blocks requires you to write a janet script. You can shoot your foot with scripting, but it is very flexible. You can easily write your own j3blocks modules after you learn j3blocks. https://codeberg.org/amano.kenji/j3blocks-extra https://codeberg.org/amano.kenji/j3blocks-extra has extra modules. j3blocks-extra has pipewire-node and pipewire-default-node. These modules allow you to monitor and control pipewire nodes on i3bar or swaybar. The whole system is very flexible, but it took a month to polish it to the point where development is largely finished. It is now in maintenance mode.
- clircle 3y agoblast from the past for me. I used i3blocks.... 10 years ago?
- amano-kenji 3y agoDo you use i3bar or swaybar? Then, j3blocks is for you.
- tionis 3y agoThere's also https://barista.run/ https://barista.run/ which allows you to build a very efficient custom i3bar using a go library.
- tionis 3y ago@amano-kenji, I think that's a great use case for Janet. Didn't expect to see the project here so soon :-)
- Arelius 3y agoSo, I even use waybar (with a minimal config) and Janet looks nice. But I just can't figure out what J3blocks is, or what I'd use it for...
- hyperhopper 3y agoPeople should also check out xmobar for a status bar you can script in a good language
- amano-kenji 3y agoI write softwares in janet and haskell. xmobar is written in haskell. I used xmobar with xmonad before. xmobar doesn't come with built-in status icons. Haskell is cumbersome in small scale, but it is precise for anything non-trivial. I write compiled programs that need to be precise in haskell. I write scripts in janet. Haskell isn't great for scripting due to its rigid but precise type system. For scripting, lisp languages feel better. At this point, I'd want to see a window manager that can be scripted in janet or scheme, but sway is okay.
- delboni 3y agoNice! I've been using babashka for doing i3blocks scripts with Clojure and is being great so far as well :) https://github.com/rafaeldelboni/dotfiles/tree/master/tag-linux/config/i3blocks/scripts https://github.com/rafaeldelboni/dotfiles/tree/master/tag-li...
- amano-kenji 3y agoWith j3blocks, you script the entire status command. You can also run your babashka commands through `cmd` j3blocks module.