summaryrefslogtreecommitdiff
path: root/internal/ui
diff options
context:
space:
mode:
authorPaul Bütow <1224732+snonux@users.noreply.github.com>2025-06-20 18:35:48 +0300
committerPaul Bütow <1224732+snonux@users.noreply.github.com>2025-06-20 18:35:48 +0300
commite12c3213df812fdc0b21eba3d918c68b05d2502a (patch)
treeb4400c158e6924f51866aceee266dab36ba7d54d /internal/ui
parent20417e3024916a23a0378f72c1336ccbb56f0bae (diff)
Add option to hide headers
Diffstat (limited to 'internal/ui')
-rw-r--r--internal/ui/table.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/internal/ui/table.go b/internal/ui/table.go
index 51bd9e4..c8ec17d 100644
--- a/internal/ui/table.go
+++ b/internal/ui/table.go
@@ -64,6 +64,7 @@ func newTable(rows []atable.Row) atable.Model {
atable.WithColumns(cols),
atable.WithRows(rows),
atable.WithFocused(true),
+ atable.WithShowHeaders(false),
)
styles := atable.DefaultStyles()
styles.Header = styles.Header.Foreground(lipgloss.Color("205"))
@@ -185,7 +186,12 @@ func (m Model) View() string {
}
func (m Model) statusLine() string {
- status := fmt.Sprintf("Total:%d InProgress:%d Due:%d", m.total, m.inProgress, m.due)
+ header := ""
+ cols := m.tbl.Columns()
+ if idx := m.tbl.ColumnCursor(); idx >= 0 && idx < len(cols) {
+ header = cols[idx].Title
+ }
+ status := fmt.Sprintf("%s Total:%d InProgress:%d Due:%d", header, m.total, m.inProgress, m.due)
return lipgloss.NewStyle().
Foreground(lipgloss.Color("229")).
Background(lipgloss.Color("57")).