Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom informations #105

Open
eoli3n opened this issue Jun 16, 2021 · 9 comments
Open

Custom informations #105

eoli3n opened this issue Jun 16, 2021 · 9 comments
Labels
area/fetching Has something to do with the fetched information. type/feature Request a new feature.

Comments

@eoli3n
Copy link

eoli3n commented Jun 16, 2021

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.

@eoli3n eoli3n added the bug label Jun 16, 2021
@grtcdr grtcdr added enhancement and removed bug labels Jun 16, 2021
@grtcdr
Copy link
Member

grtcdr commented Jun 16, 2021

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.

@eoli3n
Copy link
Author

eoli3n commented Jun 16, 2021

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 ;)

@grtcdr
Copy link
Member

grtcdr commented Jun 16, 2021

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.

@grtcdr
Copy link
Member

grtcdr commented Jun 27, 2021

Hey 😃 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.

@eoli3n
Copy link
Author

eoli3n commented Jun 27, 2021

I would prefer YAML, if a human edit this manually.
JSON is better to transfer data and not really human readable.

@grtcdr grtcdr added area/fetching Has something to do with the fetched information. type/feature Request a new feature. and removed enhancement labels Nov 16, 2021
@eoli3n
Copy link
Author

eoli3n commented Dec 12, 2021

anything about this one ?

@grtcdr
Copy link
Member

grtcdr commented Dec 12, 2021

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.

@ghost
Copy link

ghost commented Jul 29, 2022

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

@grtcdr
Copy link
Member

grtcdr commented Aug 2, 2022

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.

@grtcdr grtcdr changed the title [Feature request] Custom informations Custom informations May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/fetching Has something to do with the fetched information. type/feature Request a new feature.
Development

No branches or pull requests

2 participants