Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

GPU: Print each GPU on a different line #554

Merged
merged 9 commits into from Dec 22, 2016
Merged

GPU: Print each GPU on a different line #554

merged 9 commits into from Dec 22, 2016

Conversation

dylanaraps
Copy link
Owner

@dylanaraps dylanaraps commented Dec 22, 2016

Description

This PR makes get_gpu() display each GPU on a separate line on Linux systems.

Features

  • Each GPU is printed on a separate line.

Issues

  • None yet.

TODO

  • Testing
  • Add option to print all, dedicated or integrated.

CC @konimex,, can you test this?

@konimex
Copy link
Contributor

konimex commented Dec 22, 2016

It works!

2016-12-22-085505_804x536_scrot

For some reason, battery subtitle seems to be broke, though.

@dylanaraps
Copy link
Owner Author

Is the battery subtitle broken in master?

@konimex
Copy link
Contributor

konimex commented Dec 22, 2016

Yep, seems to be broken in master too.

@dylanaraps
Copy link
Owner Author

Fixed.

gpu="${gpu/Intel }"
fi

prin "GPU${gpu_num}" "$gpu"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You may want to change the GPU one into ${subtitle}, like the battery function.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, just did. :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was fast....

@konimex
Copy link
Contributor

konimex commented Dec 22, 2016

Also, it seems we're still printing the results starting from GPU0, should we add the value by 1 so we can start it from GPU1?

@dylanaraps
Copy link
Owner Author

Sure, easy fix. :)

@dylanaraps
Copy link
Owner Author

I've added --gpu_type which lets you pick dedicated, integrated or all. (all by default). Please test it out. :)

@konimex
Copy link
Contributor

konimex commented Dec 22, 2016

LGTM 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants