detached e757cab

feat(config): make hint mode opt-in with hint.enable

commit
e757cabfeb97f118cc4bf436638e80fc305d0eaa
author
brice · · 2026-10-19 14:57 UTC
parent
2908f8e
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
3 files · +29 -0
M internal/adapters/config/config.go +8 -0
@@ -164,6 +164,8 @@ func Defaults() ports.Config {
164164 c.Terminal.Command = []string{"foot"}
165165 }
166166 c.Terminal.AutoOpen = "first"
167+ // Hint mode is experimental: off unless the config turns it on.
168+ c.Hint.Enable = false
167169 c.Hint.TextClick = ports.ModCtrl | ports.ModShift
168170 c.Xwayland = "xwayland-satellite"
169171 c.Background.Color = "#111111"
@@ -849,6 +851,12 @@ func set(c *ports.Config, key, v string) error {
849851 return err
850852 }
851853 c.Focus.Flash = b
854+ case "hint.enable":
855+ b, err := onOff(v)
856+ if err != nil {
857+ return err
858+ }
859+ c.Hint.Enable = b
852860 case "hint.size":
853861 if v == "auto" {
854862 c.Hint.Size = 0
@@ -164,6 +164,8 @@ func Defaults() ports.Config {
164 c.Terminal.Command = []string{"foot"}164 c.Terminal.Command = []string{"foot"}
165 }165 }
166 c.Terminal.AutoOpen = "first"166 c.Terminal.AutoOpen = "first"
167+ // Hint mode is experimental: off unless the config turns it on.
168+ c.Hint.Enable = false
167 c.Hint.TextClick = ports.ModCtrl | ports.ModShift169 c.Hint.TextClick = ports.ModCtrl | ports.ModShift
168 c.Xwayland = "xwayland-satellite"170 c.Xwayland = "xwayland-satellite"
169 c.Background.Color = "#111111"171 c.Background.Color = "#111111"
@@ -849,6 +851,12 @@ func set(c *ports.Config, key, v string) error {
849 return err851 return err
850 }852 }
851 c.Focus.Flash = b853 c.Focus.Flash = b
854+ case "hint.enable":
855+ b, err := onOff(v)
856+ if err != nil {
857+ return err
858+ }
859+ c.Hint.Enable = b
852 case "hint.size":860 case "hint.size":
853 if v == "auto" {861 if v == "auto" {
854 c.Hint.Size = 0862 c.Hint.Size = 0
M internal/adapters/config/config_test.go +18 -0
@@ -1018,3 +1018,21 @@ func TestHintTextClick(t *testing.T) {
10181018 }
10191019 }
10201020 }
1021+
1022+func TestHintEnable(t *testing.T) {
1023+ if Defaults().Hint.Enable {
1024+ t.Fatal("hint mode must be off by default")
1025+ }
1026+ c, w := parseString(t, "hint.enable = on\n")
1027+ if !c.Hint.Enable || len(w) != 0 {
1028+ t.Fatal(c.Hint, w)
1029+ }
1030+ c, w = parseString(t, "hint.enable = off\n")
1031+ if c.Hint.Enable || len(w) != 0 {
1032+ t.Fatal(c.Hint, w)
1033+ }
1034+ c, w = parseString(t, "hint.enable = maybe\n")
1035+ if c.Hint.Enable || len(w) != 1 {
1036+ t.Fatal(c.Hint, w)
1037+ }
1038+}
@@ -1018,3 +1018,21 @@ func TestHintTextClick(t *testing.T) {
1018 }1018 }
1019 }1019 }
1020 }1020 }
1021+
1022+func TestHintEnable(t *testing.T) {
1023+ if Defaults().Hint.Enable {
1024+ t.Fatal("hint mode must be off by default")
1025+ }
1026+ c, w := parseString(t, "hint.enable = on\n")
1027+ if !c.Hint.Enable || len(w) != 0 {
1028+ t.Fatal(c.Hint, w)
1029+ }
1030+ c, w = parseString(t, "hint.enable = off\n")
1031+ if c.Hint.Enable || len(w) != 0 {
1032+ t.Fatal(c.Hint, w)
1033+ }
1034+ c, w = parseString(t, "hint.enable = maybe\n")
1035+ if c.Hint.Enable || len(w) != 1 {
1036+ t.Fatal(c.Hint, w)
1037+ }
1038+}
M internal/ports/config.go +3 -0
@@ -163,6 +163,9 @@ type Config struct {
163163 }
164164 // Hint configures keyboard hint mode (action hint).
165165 Hint struct {
166+ // Enable turns the experimental hint mode on (hint.enable). It is
167+ // read at startup: a reload keeps the startup value.
168+ Enable bool
166169 // LinksOnly limits the targets to links and URLs; false also
167170 // includes buttons (hint.targets = clickable).
168171 LinksOnly bool
@@ -163,6 +163,9 @@ type Config struct {
163 }163 }
164 // Hint configures keyboard hint mode (action hint).164 // Hint configures keyboard hint mode (action hint).
165 Hint struct {165 Hint struct {
166+ // Enable turns the experimental hint mode on (hint.enable). It is
167+ // read at startup: a reload keeps the startup value.
168+ Enable bool
166 // LinksOnly limits the targets to links and URLs; false also169 // LinksOnly limits the targets to links and URLs; false also
167 // includes buttons (hint.targets = clickable).170 // includes buttons (hint.targets = clickable).
168 LinksOnly bool171 LinksOnly bool

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 23

Tags 10

↑↓ moveenter openesc close