detached efbf525

fix(scripts): keep top bar clock rightmost

commit
efbf525183910532491d46fe83edfd8c780d4485
author
brice · · 2026-07-07 10:52 UTC
parent
bf27175
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
2 files · +10 -7
M README.md +1 -1
@@ -107,7 +107,7 @@ Key specs support `alt+<char>`, `alt+space`, and `alt+left/right/up/down`; digit
107107
108108 ### Bar right anchors
109109
110-The top and bottom bar right anchors run configurable commands on the daemon host. By default, `bar.top-right = vev-bar-top-right` prints hour, CPU, and memory text, and `bar.bottom-right = vev-bar-bottom-right` prints compact git state for the focused pane's `VEV_PANE_CWD`. Set either value empty to disable that anchor, or set it to another command to replace it.
110+The top and bottom bar right anchors run configurable commands on the daemon host. By default, `bar.top-right = vev-bar-top-right` prints CPU, memory, and hour text, and `bar.bottom-right = vev-bar-bottom-right` prints compact git state for the focused pane's `VEV_PANE_CWD`. Set either value empty to disable that anchor, or set it to another command to replace it.
111111
112112 Both anchors share `bar.interval`, which defaults to `5s`; values below `1s` are clamped to `1s`. vev also refreshes around attach, resize, focus, and copy-feedback changes. Commands are bounded by a timeout and output limit. On failure or timeout, vev keeps the last good value; if there is none, the anchor is empty.
113113
@@ -107,7 +107,7 @@ Key specs support `alt+<char>`, `alt+space`, and `alt+left/right/up/down`; digit
107 107
108 ### Bar right anchors108 ### Bar right anchors
109 109
110-The top and bottom bar right anchors run configurable commands on the daemon host. By default, `bar.top-right = vev-bar-top-right` prints hour, CPU, and memory text, and `bar.bottom-right = vev-bar-bottom-right` prints compact git state for the focused pane's `VEV_PANE_CWD`. Set either value empty to disable that anchor, or set it to another command to replace it.110+The top and bottom bar right anchors run configurable commands on the daemon host. By default, `bar.top-right = vev-bar-top-right` prints CPU, memory, and hour text, and `bar.bottom-right = vev-bar-bottom-right` prints compact git state for the focused pane's `VEV_PANE_CWD`. Set either value empty to disable that anchor, or set it to another command to replace it.
111 111
112 Both anchors share `bar.interval`, which defaults to `5s`; values below `1s` are clamped to `1s`. vev also refreshes around attach, resize, focus, and copy-feedback changes. Commands are bounded by a timeout and output limit. On failure or timeout, vev keeps the last good value; if there is none, the anchor is empty.112 Both anchors share `bar.interval`, which defaults to `5s`; values below `1s` are clamped to `1s`. vev also refreshes around attach, resize, focus, and copy-feedback changes. Commands are bounded by a timeout and output limit. On failure or timeout, vev keeps the last good value; if there is none, the anchor is empty.
113 113
M scripts/vev-bar-top-right +9 -6
@@ -38,19 +38,22 @@ if [ -r /proc/meminfo ]; then
3838 )
3939 fi
4040
41-line=$now
41+line=
4242 if [ -n "$cpu_pct" ]; then
43+ line="C $cpu_pct%"
44+fi
45+if [ -n "$mem_pct" ]; then
4346 if [ -n "$line" ]; then
44- line="$line cpu $cpu_pct%"
47+ line="$line M $mem_pct%"
4548 else
46- line="cpu $cpu_pct%"
49+ line="M $mem_pct%"
4750 fi
4851 fi
49-if [ -n "$mem_pct" ]; then
52+if [ -n "$now" ]; then
5053 if [ -n "$line" ]; then
51- line="$line mem $mem_pct%"
54+ line="$line $now"
5255 else
53- line="mem $mem_pct%"
56+ line="$now"
5457 fi
5558 fi
5659
@@ -38,19 +38,22 @@ if [ -r /proc/meminfo ]; then
38 )38 )
39 fi39 fi
40 40
41-line=$now41+line=
42 if [ -n "$cpu_pct" ]; then42 if [ -n "$cpu_pct" ]; then
43+ line="C $cpu_pct%"
44+fi
45+if [ -n "$mem_pct" ]; then
43 if [ -n "$line" ]; then46 if [ -n "$line" ]; then
44- line="$line cpu $cpu_pct%"47+ line="$line M $mem_pct%"
45 else48 else
46- line="cpu $cpu_pct%"49+ line="M $mem_pct%"
47 fi50 fi
48 fi51 fi
49-if [ -n "$mem_pct" ]; then52+if [ -n "$now" ]; then
50 if [ -n "$line" ]; then53 if [ -n "$line" ]; then
51- line="$line mem $mem_pct%"54+ line="$line $now"
52 else55 else
53- line="mem $mem_pct%"56+ line="$now"
54 fi57 fi
55 fi58 fi
56 59

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 12

Tags 11

↑↓ moveenter openesc close