detached 493b4a9

feat(config): default layout gaps to 0

commit
493b4a9dbfda77ebc8de0389954d88dcb4912ce8
author
brice · · 2026-09-24 09:30 UTC
parent
3ef2072
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
5 files · +8 -5
M README.md +1 -1
@@ -16,7 +16,7 @@ Configuration lives at `$XDG_CONFIG_HOME/nefertty/config.toml` (or `~/.config/ne
1616 [terminal]
1717 command = ["foot"]
1818 [layout]
19-gaps = 8
19+gaps = 0
2020 ```
2121
2222 See `examples/config.toml` for all defaults. Configuration reloads automatically when the file changes (including atomic replacements). Layout gaps, widths and presets, binds, background, and terminal command apply live; `keyboard.*` requires a restart for now. Invalid or removed files leave the current configuration in place.
@@ -16,7 +16,7 @@ Configuration lives at `$XDG_CONFIG_HOME/nefertty/config.toml` (or `~/.config/ne
16 [terminal]16 [terminal]
17 command = ["foot"]17 command = ["foot"]
18 [layout]18 [layout]
19-gaps = 819+gaps = 0
20 ```20 ```
21 21
22 See `examples/config.toml` for all defaults. Configuration reloads automatically when the file changes (including atomic replacements). Layout gaps, widths and presets, binds, background, and terminal command apply live; `keyboard.*` requires a restart for now. Invalid or removed files leave the current configuration in place.22 See `examples/config.toml` for all defaults. Configuration reloads automatically when the file changes (including atomic replacements). Layout gaps, widths and presets, binds, background, and terminal command apply live; `keyboard.*` requires a restart for now. Invalid or removed files leave the current configuration in place.
M examples/config.toml +1 -1
@@ -19,7 +19,7 @@ active = "#b4befe"
1919 inactive = ""
2020
2121 [layout]
22-gaps = 8
22+gaps = 0
2323 default_column_width = "1/2"
2424 presets = ["1/3", "1/2", "2/3", "1"]
2525
@@ -19,7 +19,7 @@ active = "#b4befe"
19 inactive = ""19 inactive = ""
20 20
21 [layout]21 [layout]
22-gaps = 822+gaps = 0
23 default_column_width = "1/2"23 default_column_width = "1/2"
24 presets = ["1/3", "1/2", "2/3", "1"]24 presets = ["1/3", "1/2", "2/3", "1"]
25 25
M internal/adapters/config/config.go +1 -1
@@ -41,7 +41,7 @@ func Defaults() ports.Config {
4141 c.Border.Width = 2
4242 c.Border.Active = "#b4befe"
4343 c.Border.Inactive = ""
44- c.Layout.Gaps = 8
44+ c.Layout.Gaps = 0
4545 c.Layout.DefaultColumnWidth = "1/2"
4646 c.Layout.Presets = []string{"1/3", "1/2", "2/3", "1"}
4747 c.Binds = make(map[string]string, len(defaultBinds))
@@ -41,7 +41,7 @@ func Defaults() ports.Config {
41 c.Border.Width = 241 c.Border.Width = 2
42 c.Border.Active = "#b4befe"42 c.Border.Active = "#b4befe"
43 c.Border.Inactive = ""43 c.Border.Inactive = ""
44- c.Layout.Gaps = 844+ c.Layout.Gaps = 0
45 c.Layout.DefaultColumnWidth = "1/2"45 c.Layout.DefaultColumnWidth = "1/2"
46 c.Layout.Presets = []string{"1/3", "1/2", "2/3", "1"}46 c.Layout.Presets = []string{"1/3", "1/2", "2/3", "1"}
47 c.Binds = make(map[string]string, len(defaultBinds))47 c.Binds = make(map[string]string, len(defaultBinds))
M internal/app/app_test.go +3 -2
@@ -140,8 +140,9 @@ func TestHeadlessSpawnClose(t *testing.T) {
140140 select {
141141 case s := <-scenes:
142142 if len(s.Windows) == count {
143- if count == 1 && s.Windows[0].Rect.W != 948 {
144- t.Errorf("width = %d, want 948", s.Windows[0].Rect.W)
143+ // Half of 1920 with the default zero gaps.
144+ if count == 1 && s.Windows[0].Rect.W != 960 {
145+ t.Errorf("width = %d, want 960", s.Windows[0].Rect.W)
145146 }
146147 return
147148 }
@@ -140,8 +140,9 @@ func TestHeadlessSpawnClose(t *testing.T) {
140 select {140 select {
141 case s := <-scenes:141 case s := <-scenes:
142 if len(s.Windows) == count {142 if len(s.Windows) == count {
143- if count == 1 && s.Windows[0].Rect.W != 948 {143+ // Half of 1920 with the default zero gaps.
144- t.Errorf("width = %d, want 948", s.Windows[0].Rect.W)144+ if count == 1 && s.Windows[0].Rect.W != 960 {
145+ t.Errorf("width = %d, want 960", s.Windows[0].Rect.W)
145 }146 }
146 return147 return
147 }148 }
M internal/core/core_test.go +2 -0
@@ -25,6 +25,7 @@ func TestOwner(t *testing.T) {
2525 cfg := config.Defaults()
2626 cfg.Keyboard.CmdKey = "alt"
2727 cfg.Border.Width = 0
28+ cfg.Layout.Gaps = 8
2829 client := make(chan ports.ClientEvent, 128)
2930 input := make(chan ports.InputEvent, 32)
3031 output := make(chan ports.OutputEvent, 8)
@@ -197,6 +198,7 @@ func TestBoundReleaseSwallowed(t *testing.T) {
197198 func TestPointerFocusAndGrab(t *testing.T) {
198199 cfg := config.Defaults()
199200 cfg.Border.Width = 0
201+ cfg.Layout.Gaps = 8
200202 client := make(chan ports.ClientEvent, 8)
201203 input := make(chan ports.InputEvent, 8)
202204 output := make(chan ports.OutputEvent, 8)
@@ -25,6 +25,7 @@ func TestOwner(t *testing.T) {
25 cfg := config.Defaults()25 cfg := config.Defaults()
26 cfg.Keyboard.CmdKey = "alt"26 cfg.Keyboard.CmdKey = "alt"
27 cfg.Border.Width = 027 cfg.Border.Width = 0
28+ cfg.Layout.Gaps = 8
28 client := make(chan ports.ClientEvent, 128)29 client := make(chan ports.ClientEvent, 128)
29 input := make(chan ports.InputEvent, 32)30 input := make(chan ports.InputEvent, 32)
30 output := make(chan ports.OutputEvent, 8)31 output := make(chan ports.OutputEvent, 8)
@@ -197,6 +198,7 @@ func TestBoundReleaseSwallowed(t *testing.T) {
197 func TestPointerFocusAndGrab(t *testing.T) {198 func TestPointerFocusAndGrab(t *testing.T) {
198 cfg := config.Defaults()199 cfg := config.Defaults()
199 cfg.Border.Width = 0200 cfg.Border.Width = 0
201+ cfg.Layout.Gaps = 8
200 client := make(chan ports.ClientEvent, 8)202 client := make(chan ports.ClientEvent, 8)
201 input := make(chan ports.InputEvent, 8)203 input := make(chan ports.InputEvent, 8)
202 output := make(chan ports.OutputEvent, 8)204 output := make(chan ports.OutputEvent, 8)

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 25

Tags 10

↑↓ moveenter openesc close