summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Bütow <1224732+snonux@users.noreply.github.com>2025-06-21 23:24:49 +0300
committerPaul Bütow <1224732+snonux@users.noreply.github.com>2025-06-21 23:24:49 +0300
commit588c4b772cc782a2c190029e220290c89a08c8c9 (patch)
tree290c8aa85847c004218fc854ae9aaefaceef868c
parentd9e09559ad92df8284ac526a8ea4de359a761497 (diff)
Add theme toggling hotkeys
-rw-r--r--README.md2
-rw-r--r--internal/ui/table.go10
2 files changed, 12 insertions, 0 deletions
diff --git a/README.md b/README.md
index a1ab82e..f138830 100644
--- a/README.md
+++ b/README.md
@@ -49,6 +49,8 @@ Task Samurai invokes the `task` command to read and modify tasks. The tasks are
### Misc
- `f`: change filter
+- `c`: random theme
+- `C`: reset theme
- `H`: toggle help
- `q` or `esc`: close search/help or quit (press `q` when nothing is open)
diff --git a/internal/ui/table.go b/internal/ui/table.go
index d0c62a0..ae3af66 100644
--- a/internal/ui/table.go
+++ b/internal/ui/table.go
@@ -589,6 +589,14 @@ func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
}
}
return m, nil
+ case "c":
+ m.theme = RandomTheme()
+ m.applyTheme()
+ return m, nil
+ case "C":
+ m.theme = m.defaultTheme
+ m.applyTheme()
+ return m, nil
case "/", "?":
m.searching = true
m.searchInput.SetValue("")
@@ -714,6 +722,8 @@ func (m Model) View() string {
"p: set priority",
"f: change filter",
"t: edit tags",
+ "c: random theme",
+ "C: reset theme",
"/, ?: search",
"n/N: next/prev search match",
"esc: close help/search",