macchina
macchina copied to clipboard
Custom informations
I would like to be able to wrap some custom commands to display information I chose. Like
# Show available upgrade in Voidlinux
custom_info:
- name: XBPS
command: xbps-query -Mnu | wc -l
I would use your fetcher on remote hosts, and run it at each login to get some useful informations, and display it prettily.
Oh, lovely idea.
Although this could be used in an improper way and may slow the program down, it's entirely dependent on the use case and the user probably knows this as well.
I can't promise this'll come out any time soon, though, because I'm not able to gauge how much time is required to deliver such a feature. And, it's not exactly top priority as there are bugs within the program I need to hunt and fix.
Yep, it's a bit hacking your tool, but I think this ability would please many users and open to different use cases. Thanks for your anwser ;)
but I think this ability would please many users and open to different use cases.
Yeah I can see how helpful this might be to someone who may want to fetch something like their public IP or packages that need to upgraded like you mentioned.
Hey :smiley: I'm back,
I'm thinking we do this in a separate file, specifically a JSON file.
I'm not sure how I'd be able to do this using JSON.
I would prefer YAML, if a human edit this manually. JSON is better to transfer data and not really human readable.
anything about this one ?
I haven't had the chance to work on this, but I did mess around with a few implementations (nothing serious, though). Something like this would require the codebase to be refactored in a way that allows custom readouts to be merged with the built-in ones.
For a basic implementation, you could maybe do something like this, and reserve custom_XX
keys for custom user data.
[keys]
host = "Host"
kernel = "Kernel"
custom_01 = "Some Title"
[custom_01]
command = "xbps-query -Mnu | wc -l"
if_empty = "No data to show"
show_if_empty = true
Hey @0x199x,
That's one fine way we could go about it, but I unfortunately don't have the time to work on this - I just have too much going on at the moment, as my focus has been slowly shifting towards working on entirely different personal projects.
I'm open to accepting a PR that extends macchina with this feature, whilst simultaneously considering its integration with user-created themes.