summaryrefslogtreecommitdiff
path: root/linuxstatus/draw.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-01-06 05:24:11 -0600
committerJeff Carr <[email protected]>2024-01-06 05:24:11 -0600
commit4529b473dc12d8a4d1b49c9ee1ba89897f86d616 (patch)
tree20cdc5bd7c644e3fb8d7afa8e7b872b1f2082684 /linuxstatus/draw.go
parenta808bb55189a44d0c3b2965805c14644f8102cca (diff)
add LinuxStatus()
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'linuxstatus/draw.go')
-rw-r--r--linuxstatus/draw.go34
1 files changed, 34 insertions, 0 deletions
diff --git a/linuxstatus/draw.go b/linuxstatus/draw.go
new file mode 100644
index 0000000..b7fbbea
--- /dev/null
+++ b/linuxstatus/draw.go
@@ -0,0 +1,34 @@
+// This creates a simple hello world window
+package linuxstatus
+
+import (
+ "go.wit.com/gui/gadgets"
+)
+
+// creates the actual widgets.
+// it's assumed you are always passing in a box
+func draw(ls *LinuxStatus) {
+ if ! ls.Ready() {return}
+ ls.group = ls.window.Box().NewGroup("Real Stuff")
+
+ ls.grid = ls.group.NewGrid("gridnuts", 2, 2)
+
+ ls.grid.SetNext(1,1)
+
+ ls.hostshort = gadgets.NewOneLiner(ls.grid, "hostname -s")
+ ls.domainname = gadgets.NewOneLiner(ls.grid, "domain name")
+ ls.NSrr = gadgets.NewOneLiner(ls.grid, "NS records =")
+ ls.uid = gadgets.NewOneLiner(ls.grid, "UID =")
+ ls.IPv4 = gadgets.NewOneLiner(ls.grid, "Current IPv4 =")
+ ls.IPv6 = gadgets.NewOneLiner(ls.grid, "Current IPv6 =")
+ ls.workingIPv6 = gadgets.NewOneLiner(ls.grid, "Real IPv6 =")
+ // ls.nics = gadgets.NewOneLiner(ls.grid, "network intefaces =")
+
+ ls.grid.NewLabel("interfaces =")
+ ls.Interfaces = ls.grid.NewCombobox("Interfaces")
+
+ ls.speedActual = gadgets.NewOneLiner(ls.grid, "refresh speed =")
+
+ ls.grid.Margin()
+ ls.grid.Pad()
+}