helix
helix copied to clipboard
Print output of a shell script into the statusline
Hi, there!
In vim it has been possible to add shell command output into the statusline.
This is what I would have in mind:
[editor.statusline]
right = ["selections", {"shell-script": "/home/user/script.sh"}, "total-line-numbers"]
I have a simple but dirty solution that requires only small changes in code:
[editor.statusline]
right = ["selections", "shell-script", "total-line-numbers"]
scripts-right = ["/home/user/script.sh"]
I dont think the second example is very nice. To make it cleaner and merge ready and look like the first example, StatusLineConfig would need to be refactored and StatusLineElement will have to be replaced by a different type. I am not sure if this is a wanted feature since helix so far seems not to get anything from outside environment. Is this something in scope of helix's philosophy? Thx
I would prefer that custom statusline elements wait on the plugin system or scripting support for configuration. Integrating to outside programs via the shell isn't the worst thing in the world but it's more Kakoune than Helix.
Thanks for the reply! The way of plugins does seem to be better