|
|
|
@@ -1,8 +1,8 @@
|
|
|
|
diff --git a/internal/cmd/statusline.go b/internal/cmd/statusline.go
|
|
|
|
diff --git a/internal/cmd/statusline.go b/internal/cmd/statusline.go
|
|
|
|
|
|
|
|
index 2edf1be8..00253eea 100644
|
|
|
|
--- a/internal/cmd/statusline.go
|
|
|
|
--- a/internal/cmd/statusline.go
|
|
|
|
+++ b/internal/cmd/statusline.go
|
|
|
|
+++ b/internal/cmd/statusline.go
|
|
|
|
@@ -6,6 +6,7 @@ import (
|
|
|
|
@@ -6,6 +6,7 @@ import (
|
|
|
|
"os"
|
|
|
|
|
|
|
|
"path/filepath"
|
|
|
|
"path/filepath"
|
|
|
|
"sort"
|
|
|
|
"sort"
|
|
|
|
"strings"
|
|
|
|
"strings"
|
|
|
|
@@ -10,10 +10,10 @@ diff --git a/internal/cmd/statusline.go b/internal/cmd/statusline.go
|
|
|
|
|
|
|
|
|
|
|
|
"github.com/spf13/cobra"
|
|
|
|
"github.com/spf13/cobra"
|
|
|
|
"github.com/steveyegge/gastown/internal/beads"
|
|
|
|
"github.com/steveyegge/gastown/internal/beads"
|
|
|
|
@@ -15,6 +16,43 @@ import (
|
|
|
|
@@ -14,6 +15,37 @@ import (
|
|
|
|
|
|
|
|
"github.com/steveyegge/gastown/internal/tmux"
|
|
|
|
"github.com/steveyegge/gastown/internal/workspace"
|
|
|
|
"github.com/steveyegge/gastown/internal/workspace"
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
+// statusLineCacheTTL is how long cached status output remains valid.
|
|
|
|
+// statusLineCacheTTL is how long cached status output remains valid.
|
|
|
|
+const statusLineCacheTTL = 10 * time.Second
|
|
|
|
+const statusLineCacheTTL = 10 * time.Second
|
|
|
|
+
|
|
|
|
+
|
|
|
|
@@ -45,10 +45,10 @@ diff --git a/internal/cmd/statusline.go b/internal/cmd/statusline.go
|
|
|
|
+ _ = os.WriteFile(path, []byte(status), 0644)
|
|
|
|
+ _ = os.WriteFile(path, []byte(status), 0644)
|
|
|
|
+}
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
|
var (
|
|
|
|
var (
|
|
|
|
statusLineSession string
|
|
|
|
statusLineSession string
|
|
|
|
)
|
|
|
|
@@ -34,6 +66,19 @@ func init() {
|
|
|
|
@@ -32,6 +70,20 @@ func init() {
|
|
|
|
|
|
|
|
func runStatusLine(cmd *cobra.Command, args []string) error {
|
|
|
|
func runStatusLine(cmd *cobra.Command, args []string) error {
|
|
|
|
t := tmux.NewTmux()
|
|
|
|
t := tmux.NewTmux()
|
|
|
|
|
|
|
|
|
|
|
|
@@ -68,7 +68,7 @@ diff --git a/internal/cmd/statusline.go b/internal/cmd/statusline.go
|
|
|
|
// Get session environment
|
|
|
|
// Get session environment
|
|
|
|
var rigName, polecat, crew, issue, role string
|
|
|
|
var rigName, polecat, crew, issue, role string
|
|
|
|
|
|
|
|
|
|
|
|
@@ -149,7 +201,12 @@ func runWorkerStatusLine(t *tmux.Tmux, session, rigName, polecat, crew, issue st
|
|
|
|
@@ -150,7 +195,11 @@ func runWorkerStatusLine(t *tmux.Tmux, session, rigName, polecat, crew, issue st
|
|
|
|
|
|
|
|
|
|
|
|
// Output
|
|
|
|
// Output
|
|
|
|
if len(parts) > 0 {
|
|
|
|
if len(parts) > 0 {
|
|
|
|
@@ -81,7 +81,7 @@ diff --git a/internal/cmd/statusline.go b/internal/cmd/statusline.go
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return nil
|
|
|
|
return nil
|
|
|
|
@@ -389,7 +446,12 @@ func runMayorStatusLine(t *tmux.Tmux) error {
|
|
|
|
@@ -389,7 +438,11 @@ func runMayorStatusLine(t *tmux.Tmux) error {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -94,7 +94,7 @@ diff --git a/internal/cmd/statusline.go b/internal/cmd/statusline.go
|
|
|
|
return nil
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -458,7 +520,12 @@ func runDeaconStatusLine(t *tmux.Tmux) error {
|
|
|
|
@@ -458,7 +511,11 @@ func runDeaconStatusLine(t *tmux.Tmux) error {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -107,7 +107,7 @@ diff --git a/internal/cmd/statusline.go b/internal/cmd/statusline.go
|
|
|
|
return nil
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -526,7 +593,12 @@ func runWitnessStatusLine(t *tmux.Tmux, rigName string) error {
|
|
|
|
@@ -526,7 +583,11 @@ func runWitnessStatusLine(t *tmux.Tmux, rigName string) error {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -120,7 +120,7 @@ diff --git a/internal/cmd/statusline.go b/internal/cmd/statusline.go
|
|
|
|
return nil
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -617,7 +689,12 @@ func runRefineryStatusLine(t *tmux.Tmux, rigName string) error {
|
|
|
|
@@ -617,7 +678,11 @@ func runRefineryStatusLine(t *tmux.Tmux, rigName string) error {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|