-
Notifications
You must be signed in to change notification settings - Fork 53
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
What do we want to display? #39
Comments
I personally would like to start by adding the local IP address, as its the easiest of the bunch. |
I have a computer with 2 GPUs. |
An important thing to consider is systems with 2 or more, I think limiting the GPU output to 2 is better than having say four lines of:
|
By default, it could be limited, with an option to show all GPUs. |
That's a good idea 💡 |
#53 You can now view your local IP address 🚀 |
@123marvin123 We should fetch GPUs next! We might also want to move this issue to libmacchina as it makes more sense for the issue to be there now that they are separate repositories. |
How about an option for smaller ascii art as seen in I'd also love to see even more bar options:
I suppose you could also use bars for things like cpu/gpu temps? Lastly, an option to choose circles or squares in the bar, and an option to have shortened (3 letter) names in the left column. With these options themes would be more customizable. Cheers, |
Small ASCII would not look to appealing, it only looks nice on fetchers that fetch a maximum of 5 lines, but it is possible to detect the number of readouts and display a smaller ASCII image if only several readouts are visible. The other suggestions already do exist, our second theme, "Helium" has three letter keys, and square bars. Moving bars is not feasible as the point of Macchina is to be a static program that you call, and it writes your information to the terminal as fast as it can, so no while loops. Storage, backlight and volume information might come in the future, and since they are not yet implemented, each of them needs to be added as a fetchable readout by libmacchina, so Macchina can display it. |
That would be excellent, as I (and I'm sure others) often only want about 5 lines or output. Again, it would just be nice to have that option.
Yes, but there is currently no possible way to achieve three letter keys with round bars. Therefore, either adding an option to specify the length of the keys OR an option to specify the shape of the bars would be handy. But ultimately, options for both would negate the need for theme's altogether as you would then be able to completely customise Macchina's output style.
I wasn't suggesting moving bars necessarily. Similar to the CPU Usage bar, it just prints out the current state. Same could be done for Swap usage, and cpu/gpu temps.
Sounds good. I look forward to hopefully seeing these new features in future releases! 👍 |
Hey @Ramiferous!
Yeah there was a typo in your message that I should've understood as "more" instead of "move", my apologies.
Ask and you shall get, here's a sneak peek :^) Smaller ASCII art is activated when the amount of readouts is less or equal to 6 I made a small NetBSD logo, what do you think?
|
UPDATEI'm working on extending the capabilities of CPU Usage, for now this is exclusive to Linux and NetBSD thanks to the This is a Rust-only approach, it is completely safe and no commands are called. I'm not planning to make a readout for processes, and I'm thinking of appending them to the CPU% (Load), and they are only visible when bars are disabled. The amount of threads is also exposed by sysinfo but this is Linux only and will land in the future. |
Excellent! I still think a flag as an option to chose small ascii might be nice.
That cool, I like it! Can the flag be orange/red and the flagpole be grey/black (depending on your theme) Also, Any thoughts on the cpu/gpu & temp bars? |
That's a good idea, will do :)
I'll try and tweak the colors, as the current choice of color doesn't reflect that of the actual logo.
They'll definitely come in the future :) |
Anything new about gpu hardware support? |
I've already started implementing GPU support as a separate crate but I haven't gotten around to actually working on it and completing it, it's not even close to being complete to be frank. But as soon as I have some free time to focus on it it'll be added. |
@Staubgeborener A library I'm working, pci_fetch can fetch PCI devices' information, among them GPUs, all that's left to do is have libmacchina integrate this feature and macchina will have GPU support in no time :) |
Maybe there could be also switch to show versions of shell, windows manager and terminal? I would like to have output similar to And after this and GPU I could replace neofetch with macchina. Then I still need to find some fast replacement for |
Hey @matrixik
There's really no good way to do this, shell versions like
Macchina doesn't have this feature currently, but you could always import your own ascii art, ANSI color codes work too so you could have it exactly like Neofetch's. |
Sorry, I wrote it in confusing way, by "similar output" I mean similar data with version numbers, not similar graphic representation (I don't really care about this).
I don't get this part. You run it from shell so you should have access to all shell environment variables (from any language). No? I don't know how are you detecting different programs but maybe it would be possible to locate they binary and run it with |
This would work if Rust exposed to macchina what a shell exposes to a shell script, but unfortunately, this isn't the case.
We don't need to care about where the shell binary is located, the issue stems from the fact that different shells write different things when invoked with So to sum it up, Rust programs don't have access to a lot of environment variables like shell programs do. |
I'll give you an example:
Examplezsh
bash
|
Thank you for response. I did not know that Rust have such problems with environment variables. |
can we display the current shell instead of the default shell? or add a new variable called |
@thorion3006 Noted :) |
@thorion3006 see this commit, it's planned to land as a configuration option (and command line flag too). |
thanks :-) |
You could take it for a spin if you'd like :) |
@grtcdr, the fact that Rust cannot access shell's version from std::env is not a problem, you can just run a command like fn get_shell_version(shell: &str) -> Option<String> {
let output = std::process::Command::new(shell)
.arg("-c")
.arg(format!("echo -n ${}_VERSION", shell.to_uppercase()))
.output();
match output {
Ok(output) => {
let stdout = String::from_utf8_lossy(&output.stdout).to_string();
if stdout.is_empty() {
None
} else {
Some(stdout)
}
}
Err(_) => None
}
} I tested it with bash, fish and zsh, it works as expected, returning data in format like this:
for these shells, respectively |
Can you provide a benchmark? I'd love to know how well this runs, as we might ship this feature in the future. |
@grtcdr, sure. This is what i used to test those 3 shells fn main() {
println!("{}", get_shell_version("bash").unwrap());
println!("{}", get_shell_version("fish").unwrap());
println!("{}", get_shell_version("zsh").unwrap());
}
fn get_shell_version(shell: &str) -> Option<String> {
let output = std::process::Command::new(shell)
.arg("-c")
.arg(format!("echo -n ${}_VERSION", shell.to_uppercase()))
.output();
match output {
Ok(output) => {
let stdout = String::from_utf8_lossy(&output.stdout).to_string();
if stdout.is_empty() {
None
} else {
Some(stdout)
}
}
Err(_) => None
}
} Not really sure if this is exactly what you assumed by "benchmark", so if it's not what you wanted, please tell me what a benchmark for this should be like |
By benchmark he means make a |
Yeah, it would also help if you replicated our current |
I replicated your
on Intel Core 2 3.00Ghz |
My bad, didn't think this may be so bad for performance |
I also tried to implement this a while ago but stopped since the performance was not great. |
Yeah, they all like to print out their versions differently, the worst offender is probably bash. version info hides behind an entire paragraph, so it's not exactly made for parsing. |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
In it's current state, Macchina is limited in the amount of displayed data. We should display more information and this issue is here to collect some ideas:
The text was updated successfully, but these errors were encountered: