J3blocks is a Janet scripting system for i3bar and swaybar(codeberg.org)
codeberg.org
J3blocks is a Janet scripting system for i3bar and swaybar
https://codeberg.org/amano.kenji/j3blocks
10 comments
blast from the past for me. I used i3blocks.... 10 years ago?
Do you use i3bar or swaybar? Then, j3blocks is for you.
There's also https://barista.run/ which allows you to build a very efficient custom i3bar using a go library.
@amano-kenji, I think that's a great use case for Janet.
Didn't expect to see the project here so soon :-)
Nice! 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-li...
https://github.com/rafaeldelboni/dotfiles/tree/master/tag-li...
With j3blocks, you script the entire status command.
You can also run your babashka commands through `cmd` j3blocks module.
You can also run your babashka commands through `cmd` j3blocks module.
So, 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...
People should also check out xmobar for a status bar you can script in a good language
I 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.
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.
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 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 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.