detached b3cee94

refactor(core): tidy bind returns and sentCache doc

commit
b3cee94adf54427a27b4eede88ab22d4542ec16a
author
brice · · 2026-10-08 06:07 UTC
parent
640f800
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
2 files · +4 -10
M internal/core/core.go +2 -2
@@ -149,8 +149,8 @@ type Core struct {
149149 pulse focusPulse
150150 }
151151
152-// sentCache is what core last sent on its latest-only channels; an
153-// unchanged value is not sent again.
152+// sentCache is what core last sent to wayland and on its latest-only
153+// channels; an unchanged value is not sent again.
154154 type sentCache struct {
155155 outputs ports.SetOutputs
156156 state ports.State
@@ -149,8 +149,8 @@ type Core struct {
149 pulse focusPulse149 pulse focusPulse
150 }150 }
151 151
152-// sentCache is what core last sent on its latest-only channels; an152+// sentCache is what core last sent to wayland and on its latest-only
153-// unchanged value is not sent again.153+// channels; an unchanged value is not sent again.
154 type sentCache struct {154 type sentCache struct {
155 outputs ports.SetOutputs155 outputs ports.SetOutputs
156 state ports.State156 state ports.State
M internal/core/input.go +2 -8
@@ -323,10 +323,7 @@ func (c *Core) runBind(ctx context.Context, action Action) error {
323323 return err
324324 }
325325 }
326- if err := c.publish(ctx); err != nil {
327- return err
328- }
329- return nil
326+ return c.publish(ctx)
330327 }
331328
332329 // scaleBind steps the focused output's scale and asks for it to be saved.
@@ -346,8 +343,5 @@ func (c *Core) scaleBind(ctx context.Context, action Action) error {
346343 default:
347344 }
348345 }
349- if err := c.publish(ctx); err != nil {
350- return err
351- }
352- return nil
346+ return c.publish(ctx)
353347 }
@@ -323,10 +323,7 @@ func (c *Core) runBind(ctx context.Context, action Action) error {
323 return err323 return err
324 }324 }
325 }325 }
326- if err := c.publish(ctx); err != nil {326+ return c.publish(ctx)
327- return err
328- }
329- return nil
330 }327 }
331 328
332 // scaleBind steps the focused output's scale and asks for it to be saved.329 // scaleBind steps the focused output's scale and asks for it to be saved.
@@ -346,8 +343,5 @@ func (c *Core) scaleBind(ctx context.Context, action Action) error {
346 default:343 default:
347 }344 }
348 }345 }
349- if err := c.publish(ctx); err != nil {346+ return c.publish(ctx)
350- return err
351- }
352- return nil
353 }347 }

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 26

Tags 10

↑↓ moveenter openesc close