summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSean E. Russell <ser@ser1.net>2020-02-26 15:51:46 -0600
committerSean E. Russell <ser@ser1.net>2020-02-26 15:51:46 -0600
commit6befa0ef84b7796705d474367d5b8667526c89d6 (patch)
treea1b05f55756b80f55135e7ddaddc8167baf8f933
parent3641a94ba922336e18e11fc7ee28512489a26dac (diff)
Fixes #59: keys not controlling processes widget
-rw-r--r--CHANGELOG.md15
-rw-r--r--layout/layout.go10
2 files changed, 20 insertions, 5 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index f4468be..e45b058 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -15,11 +15,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [3.4.x] - ??
-- Added: metrics. If run with the `--export :2112` flag (`:2112` is a port),
- metrics are exposed as Prometheus metrics on that port and can be HTTP
- GET-ted.
-- Added: a battery gauge as a `power` widget; battery as a bar rather than
+### Added
+
+- Device data export via HTTP. If run with the `--export :2112` flag (`:2112`
+ is a port), metrics are exposed as Prometheus metrics on that port.
+- A battery gauge as a `power` widget; battery as a bar rather than
a histogram.
+- Temp widget displays degree symbol (merged from BartWillems, thanks
+ also fleaz)
+
+### Fixed
+
+- Keys not controlling process widget, #59
## [3.3.2] - ??
diff --git a/layout/layout.go b/layout/layout.go
index 875bb81..d5380a6 100644
--- a/layout/layout.go
+++ b/layout/layout.go
@@ -260,7 +260,6 @@ func countMaxHeight(rs [][]widgetRule) int {
// deepFindProc looks in the UI widget tree for the ProcWidget,
// and returns it if found or nil if not.
func deepFindProc(gs interface{}) *widgets.ProcWidget {
- // FIXME: `procs` layout isn't passing down keystrokes
// Recursive function #1. Recursion is OK here because the number
// of UI elements, even in a very complex UI, is going to be
// relatively small.
@@ -286,6 +285,15 @@ func deepFindProc(gs interface{}) *widgets.ProcWidget {
}
}
}
+ fs2, ok := gs.([][]interface{})
+ if ok {
+ for _, g := range fs2 {
+ v := deepFindProc(g)
+ if v != nil {
+ return v
+ }
+ }
+ }
p, ok := gs.(*widgets.ProcWidget)
if ok {
return p