1 Commits
Author SHA1 Message Date
Andy Dixon 8b158b1b66 Add N/C/M direct sort keys; dockertop 1.1.0 2026-10-07 14:12:56 +01:00
4 changed files with 22 additions and 2 deletions
+5
View File
@@ -1,5 +1,10 @@
# Changelog # Changelog
## 1.1.0 — 2026-10-07
- `N`, `C` and `M` sort directly by name, CPU or memory (command, CPU or
memory in the process view); `s` still cycles.
## 1.0.0 — 2026-10-07 ## 1.0.0 — 2026-10-07
First release. First release.
+1 -1
View File
@@ -21,7 +21,7 @@ pids limit, I/O rates and uptime.
ports, mounts, labels; environment hidden until you press `e`) and `l` follows ports, mounts, labels; environment hidden until you press `e`) and `l` follows
the logs. Actions, each confirmed first: stop/start (`x`), restart (`r`), the logs. Actions, each confirmed first: stop/start (`x`), restart (`r`),
pause/unpause (`p`) and send a signal (`k`), to the container or, in the pause/unpause (`p`) and send a signal (`k`), to the container or, in the
process view, to the selected process. Search (`/`), sort (`s`), show stopped process view, to the selected process. Search (`/`), sort (`s` to cycle, `N`/`C`/`M` for name, CPU, memory), show stopped
(`a`), command line (`c`), help (`h`). Settings persist in (`a`), command line (`c`), help (`h`). Settings persist in
`~/.config/dockertop/config`. See `man dockertop`. `~/.config/dockertop/config`. See `man dockertop`.
+3
View File
@@ -189,6 +189,9 @@ Incremental search: over name, ID, image, compose project and status in
the list; over command line, name, user and PID in the process view. the list; over command line, name, user and PID in the process view.
\fBEnter\fR keeps the filter, \fBEsc\fR clears it. \fBEnter\fR keeps the filter, \fBEsc\fR clears it.
.TP .TP
.B N, C, M
Sort by name (command in the process view), CPU or memory.
.TP
.B s .B s
Cycle the sort column. The process view sorts by Cycle the sort column. The process view sorts by
.BR CPU , .BR CPU ,
+13 -1
View File
@@ -799,6 +799,18 @@ func (a *app) rune(r rune) (quit bool) {
a.sortBy = (a.sortBy + 1) % len(sortNames) a.sortBy = (a.sortBy + 1) % len(sortNames)
a.rebuild() a.rebuild()
} }
case 'N', 'C', 'M':
name := map[rune]string{'N': "NAME", 'C': "CPU", 'M': "MEM"}[r]
if a.view == viewProcs {
if name == "NAME" {
name = "COMMAND"
}
a.psortBy = indexOf(psortNames, name)
a.rebuildProcs()
} else {
a.sortBy = indexOf(sortNames, name)
a.rebuild()
}
case 't': case 't':
if a.view == viewProcs { if a.view == viewProcs {
a.ptree = !a.ptree a.ptree = !a.ptree
@@ -1388,7 +1400,7 @@ func (a *app) drawHelp() {
"", "",
"Keys", "Keys",
" Up/Down PgUp/PgDn Home/End move Enter processes d details (e: environment) l logs (Left/Right scroll)", " Up/Down PgUp/PgDn Home/End move Enter processes d details (e: environment) l logs (Left/Right scroll)",
" / search s sort t tree a show stopped containers c command line h help q quit / back", " / search s cycle sort N/C/M sort by name/CPU/memory t tree a show stopped containers c command line h help q quit / back",
"", "",
"Settings (sorts, trees, a, c, refresh) are saved to " + configPath() + " on exit.", "Settings (sorts, trees, a, c, refresh) are saved to " + configPath() + " on exit.",
"Needs access to the Docker socket (docker group or root). Signalling processes and container user names need root.", "Needs access to the Docker socket (docker group or root). Signalling processes and container user names need root.",