tomastomecek / tmux-top Goto Github PK
View Code? Open in Web Editor NEWMonitoring information for your tmux status line.
License: GNU General Public License v2.0
Monitoring information for your tmux status line.
License: GNU General Public License v2.0
Packit failed on creating pull-requests in dist-git:
dist-git branch | error |
---|---|
f35 |
Failed to download file from URL https://github.com/TomasTomecek/tmux-top/archive/v0.1.1/tmux-top-0.1.1.tar.gz. Reason: 'Not Found'. |
f36 |
Failed to download file from URL https://github.com/TomasTomecek/tmux-top/archive/v0.1.1/tmux-top-0.1.1.tar.gz. Reason: 'Not Found'. |
main |
Failed to download file from URL https://github.com/TomasTomecek/tmux-top/archive/v0.1.1/tmux-top-0.1.1.tar.gz. Reason: 'Not Found'. |
You can retrigger the update by adding a comment (/packit propose-downstream
) into this issue.
I've been unable to build tmux-top successfully on aarch64 (Termux):
uname -a
Linux localhost 4.9.200-perf-g44bd5bc #1 SMP PREEMPT Sun Nov 24 19:53:16 UTC 2019 aarch64 Android
go get github.com/TomasTomecek/tmux-top/cmd/tmux-top
# github.com/TomasTomecek/tmux-top/cmd/tmux-top
dev/golang/src/github.com/TomasTomecek/tmux-top/cmd/tmux-top/cli.go:115:4: unknown field 'ShortName' in
struct literal of type cli.Command
dev/golang/src/github.com/TomasTomecek/tmux-top/cmd/tmux-top/cli.go:117:4: cannot use print_net (type fu
nc(*cli.Context)) as type cli.ActionFunc in field value
dev/golang/src/github.com/TomasTomecek/tmux-top/cmd/tmux-top/cli.go:121:4: unknown field 'ShortName' in
struct literal of type cli.Command
dev/golang/src/github.com/TomasTomecek/tmux-top/cmd/tmux-top/cli.go:123:4: cannot use print_mem (type fu
nc(*cli.Context)) as type cli.ActionFunc in field value
dev/golang/src/github.com/TomasTomecek/tmux-top/cmd/tmux-top/cli.go:127:4: unknown field 'ShortName' in
struct literal of type cli.Command
dev/golang/src/github.com/TomasTomecek/tmux-top/cmd/tmux-top/cli.go:129:4: cannot use print_load (type f
unc(*cli.Context)) as type cli.ActionFunc in field value
dev/golang/src/github.com/TomasTomecek/tmux-top/cmd/tmux-top/cli.go:133:4: unknown field 'ShortName' in
struct literal of type cli.Command
dev/golang/src/github.com/TomasTomecek/tmux-top/cmd/tmux-top/cli.go:135:4: cannot use print_io (type fun
c(*cli.Context)) as type cli.ActionFunc in field value
dev/golang/src/github.com/TomasTomecek/tmux-top/cmd/tmux-top/cli.go:139:4: unknown field 'ShortName' in
struct literal of type cli.Command
dev/golang/src/github.com/TomasTomecek/tmux-top/cmd/tmux-top/cli.go:141:4: cannot use print_sens (type f
unc(*cli.Context)) as type cli.ActionFunc in field value
dev/golang/src/github.com/TomasTomecek/tmux-top/cmd/tmux-top/cli.go:141:4: too many errors
Cross compiling for ARM works though (and produces a usable binary)
CC=arm-linux-gnueabihf-gcc GOOS=linux GOARCH=arm GOARM=7 CGO_ENABLED=0 go build -a -ldflags '-extldflags "-static"' -v -o tmux-top_linux_armv8_static -buildmode=default ./cmd/tmux-top
input interval values will be in form strings:
"0.2"
-- absolute value 0.2
"20%"
-- twenty percent of max value"2.6GB"
-- absolute valueAt the moment tmux-top blocks for 1 second to obtain some stats (I/O). It would make more sense to store them on disk and return right away (~/.cache/tmux-top/
).
...but first need to figure out how to find out that value is not present in json
also, load user config and default config; if value is not in userconfig, load it from default
Resources:
http://stackoverflow.com/questions/19633763/unmarshaling-json-in-golang-required-field
http://attilaolah.eu/2013/11/29/json-decoding-in-go/
Rather than:
go get github.com/TomasTomecek/tmux-top/cli
mv ${GOPATH}/bin/{cli,tmux-top}
The more idiomatic approach would be to have the source in a ./cmd/
sub-directory, so users need only to do:
go get github.com/TomasTomecek/tmux-top/cmd/tmux-top
e.g. if it's too low (for net)
This is related to #12. tmux-top should never block, instead it should store raw data on disk and just provide stats based on the existing data.
Related: tmux/tmux#797 (comment)
https://www.cyberciti.biz/tips/linux-find-out-wireless-network-speed-signal-strength.html
I have powerline9k theme; not sure if there's compatible
tmux-top net
#[bg=default,fg=white]W#[bg=default,fg=default] #[bg=default,fg=green]192.168.20.171/24#[bg=default,fg=default]
tmux -V
tmux 2.1
e.g. "1.2GB"
Edit: merged with #3
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.