* Prevent flickering in cmdRunner widgets This commit removes flickering in the cmdRunner widgets while preserving the live-update functionality. It amends 45b955 by not redrawing on every write call. Instead, the logic in Refresh is as follows: 1. If the command is already running, it will not try to re-run the command. The default case in the select will trigger a re-draw instead so that new output can be seen. This accommodates long-runing commands eg. tailing a log. 2. If the command is not already running, it will trigger a new run. When the command terminates, it will trigger a re-draw. This means the widget refreshes as soon as possible, to accommodate the original use case of running a command and displaying its output in the widget. In all cases, the widget will not re-draw more often than the refresh interval. This is what eliminates flickering, since the previous implementation before using goroutines was not redrawing more than once per refresh interval. * Remove useless locking in Refresh Since the Refresh command doesn't actually block on anything, and the goroutines have their own locking, Refresh shouldn't lock.
WTF (aka 'wtfutil') is the personal information dashboard for your terminal, providing at-a-glance access to your very important but infrequently-needed stats and data.
Used by thousands of developers and tech people around the world, WTF is free and open-source. To support the continued use and development of WTF, please consider sponsoring WTF via GitHub Sponsors.
- Installation
- Communication
- Documentation
- Modules
- Getting Bugs Fixed or Features Added
- Contributing to the Source Code
- Contributing to the Documentation
- Contributors
- Acknowledgements
Installation
Installing via Homebrew
The simplest way from Homebrew:
brew install wtfutil
wtfutil
That version can sometimes lag a bit, as recipe updates take time to get accepted into homebrew-core
. If you always want the bleeding edge of releases, you can tap it:
brew tap wtfutil/wtfutil
brew install wtfutil
wtfutil
Installing via MacPorts
You can also install via MacPorts:
sudo port selfupdate
sudo port install wtfutil
wtfutil
Installing via Scarf
You can also install via Scarf:
scarf install wtfutil
wtfutil
Installing a Binary
Download the latest binary from GitHub.
WTF is a stand-alone binary. Once downloaded, copy it to a location you can run executables from (ie: /usr/local/bin/
), and set the permissions accordingly:
chmod a+x /usr/local/bin/wtfutil
and you should be good to go.
Installing from Source
If you want to run the build command from within your $GOPATH
:
# Set the Go proxy
export GOPROXY="https://proxy.golang.org,direct"
# Disable the Go checksum database
export GOSUMDB=off
# Enable Go modules
export GO111MODULE=on
go get -u github.com/wtfutil/wtf
cd $GOPATH/src/github.com/wtfutil/wtf
make install
make run
If you want to run the build command from a folder that is not in your $GOPATH
:
# Set the Go proxy
export GOPROXY="https://proxy.golang.org,direct"
go get -u github.com/wtfutil/wtf
cd $GOPATH/src/github.com/wtfutil/wtf
make install
make run
Note: WTF is only compatible with Go versions 1.12.0 or later (due to the use of Go modules and newer standard library functions). If you would like to use gccgo
to compile, you must use gccgo-9
or later which introduces support for Go modules.
Running via Docker
You can run wtf
inside a docker container:
# download the source
git clone https://github.com/wtfutil/wtf
# build the docker container
docker build -t wtfutil .
# run the container
docker run -it wtfutil
Communication
Slack
If you’re a member of the Gophers Slack community (https://invite.slack.golangbridge.org) there’s a WTFUtil channel you should join for all your WTF questions, development conversations, etc.
Find #wtfutil on https://gophers.slack.com/ and join us.
Also, follow on Twitter for news and latest updates.
Documentation
See https://wtfutil.com for the definitive documentation. Here's some short-cuts:
Modules
Modules are the chunks of functionality that make WTF useful. Modules are added and configured by including their configuration values in your config.yml
file. The documentation for each module describes how to configure them.
Some interesting modules you might consider adding to get you started:
Getting Bugs Fixed or Features Added
WTF is open-source software, informally maintained by a small collection of volunteers who come and go at their leisure. There are absolutely no guarantees that, even if an issue is opened for them, bugs will be fixed or features added.
If there is a bug that you really need to have fixed or a feature you really want to have implemented, you can greatly increase your chances of that happening by creating a bounty on BountySource to provide an incentive for someone to tackle it.
Contributing to the Source Code
First, kindly read Talk, then code by Dave Cheney. It's great advice and will often save a lot of time and effort.
Next, kindly read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests.
Then create your branch, write your code, submit your PR, and join the rest of the awesome people who've contributed their time and effort towards WTF. Without their contributors, WTF wouldn't be possible.
Don't worry if you've never written Go before, or never contributed to an open source project before, or that your code won't be good enough. For a surprising number of people WTF has been their first Go project, or first open source contribution. If you're here, and you've read this far, you're the right stuff.
Contributing to the Documentation
Documentation now lives in its own repository here: https://github.com/wtfutil/wtfdocs.
Please make all additions and updates to documentation in that repository.
Adding Dependencies
Dependency management in WTF is handled by Go modules. Please check out that page for more details on how Go modules work.
Contributors
Acknowledgments
The inspiration for WTF
came from Monica Dinculescu's
tiny-care-terminal.
WTF is built atop tcell and tview, fantastic projects both. WTF is built, packaged, and deployed via GoReleaser.