Skip to content
This repository has been archived by the owner on Aug 29, 2020. It is now read-only.

Addition of a Clock Widget? #72

Closed
TheCedarPrince opened this issue Nov 29, 2018 · 10 comments
Closed

Addition of a Clock Widget? #72

TheCedarPrince opened this issue Nov 29, 2018 · 10 comments
Labels
enhancement New feature or request

Comments

@TheCedarPrince
Copy link

I really like GoTop - I usually have it full screen on one of my monitors.

Would there be any way there could be a built-in clock widget to display time as my task bar is taken up by the GoTop terminal I have in maximum size?

Thanks!

@TheCedarPrince TheCedarPrince changed the title Clock Widget Addition of a Clock Widget? Nov 29, 2018
@cjbassi
Copy link
Owner

cjbassi commented Nov 29, 2018

Would you prefer to have the time in a statusbar like in vtop or add a new widget that works like the tmux clock?

@cjbassi cjbassi added the enhancement New feature or request label Nov 29, 2018
@TheCedarPrince
Copy link
Author

I was envisioning something more like vtop except the widget could be placed in a small box above (or below - whichever looks nicer) the disk usage and temperatures widget.

image

What we could play around with is looking at the vertical gap at the bottom of gotop (as you can see in my picture) which spans the entirety of the command prompt.

I'd be happy to test things out but I do not have the skill nor bandwidth to make the widget right now...

Thanks @cjbassi!

@cjbassi
Copy link
Owner

cjbassi commented Dec 6, 2018

So the gap at the bottom is actually just a rounding error. It goes away on certain terminal sizes. But we could also just create a space at the bottom for a clock/statusbar.

@TheCedarPrince
Copy link
Author

Great! Let's try it at @cjbassi !

@cjbassi cjbassi closed this as completed in 5d17121 Jan 1, 2019
@cjbassi
Copy link
Owner

cjbassi commented Jan 1, 2019

So you can now add a statusbar with a clock by passing the -b flag. 😄 Let me know if it works for you or if we should change anything with it.

@cjbassi
Copy link
Owner

cjbassi commented Jan 4, 2019

Just added a clock widget, so I decided to change the statusbar so its now enabled with -s. Breaking change ik, but we just added this so no biggie I assume. :D

@TheCedarPrince
Copy link
Author

@cjbassi - a little naive with Go; how do I update gotop to try this out?

@cjbassi
Copy link
Owner

cjbassi commented Jan 15, 2019

You can do go get -u github.com/cjbassi/gotop to install it into your gopath. The -u flag allows the package to be updated if it's already installed. Or you can install gotop-git from the AUR if you're on Arch Linux. Or to build an executable that you can do what you want with, you can do

git clone https://github.com/cjbassi/gotop && cd gotop && go build

Hope that helps :)

@TheCedarPrince
Copy link
Author

TheCedarPrince commented Jan 15, 2019

Hey @cjbassi - tried to use go to update via my gopath and ran into this error:

go get -u github.com/cjbassi/gotop

package context: unrecognized import path "context" (import path does not begin with hostname)

My go version is go1.6.2 linux/amd64.

Any idea about why this is happening?

CP

@cjbassi
Copy link
Owner

cjbassi commented Jan 15, 2019

So the issue there is that the context package was added in Go 1.7, so you'd have to update Go. Not sure which package is using it. I'm planning on releasing a new version of gotop soon if that helps too since there will be binaries available.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants