detached ed24532

fix(launcher): pass cursor theme and size to child apps

commit
ed24532912d318be2e3e6823b247ff89f0cb74d8
author
brice · · 2026-09-25 14:58 UTC
parent
88e2b23
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
2 files · +8 -3
M internal/adapters/launcher/launcher.go +6 -1
@@ -31,7 +31,7 @@ func ChildEnv(base []string, waylandDisplay, runtimeDir string) []string {
3131 continue
3232 }
3333 switch {
34- case key == "HOME", key == "USER", key == "LOGNAME", key == "SHELL", key == "PATH", key == "LANG", strings.HasPrefix(key, "LC_"), strings.HasPrefix(key, "XDG_"):
34+ case key == "HOME", key == "USER", key == "LOGNAME", key == "SHELL", key == "PATH", key == "LANG", strings.HasPrefix(key, "LC_"), strings.HasPrefix(key, "XDG_"), strings.HasPrefix(key, "XCURSOR_"):
3535 values[key] = value
3636 }
3737 }
@@ -39,6 +39,11 @@ func ChildEnv(base []string, waylandDisplay, runtimeDir string) []string {
3939 values["XDG_RUNTIME_DIR"] = runtimeDir
4040 values["XDG_CURRENT_DESKTOP"] = "nefertty"
4141 values["XDG_SESSION_TYPE"] = "wayland"
42+ // X11 apps (through Xwayland) and toolkits pick their own cursor size:
43+ // give them the compositor's, 24 unless set.
44+ if values["XCURSOR_SIZE"] == "" {
45+ values["XCURSOR_SIZE"] = "24"
46+ }
4247 keys := make([]string, 0, len(values))
4348 for key := range values {
4449 keys = append(keys, key)
@@ -31,7 +31,7 @@ func ChildEnv(base []string, waylandDisplay, runtimeDir string) []string {
31 continue31 continue
32 }32 }
33 switch {33 switch {
34- case key == "HOME", key == "USER", key == "LOGNAME", key == "SHELL", key == "PATH", key == "LANG", strings.HasPrefix(key, "LC_"), strings.HasPrefix(key, "XDG_"):34+ case key == "HOME", key == "USER", key == "LOGNAME", key == "SHELL", key == "PATH", key == "LANG", strings.HasPrefix(key, "LC_"), strings.HasPrefix(key, "XDG_"), strings.HasPrefix(key, "XCURSOR_"):
35 values[key] = value35 values[key] = value
36 }36 }
37 }37 }
@@ -39,6 +39,11 @@ func ChildEnv(base []string, waylandDisplay, runtimeDir string) []string {
39 values["XDG_RUNTIME_DIR"] = runtimeDir39 values["XDG_RUNTIME_DIR"] = runtimeDir
40 values["XDG_CURRENT_DESKTOP"] = "nefertty"40 values["XDG_CURRENT_DESKTOP"] = "nefertty"
41 values["XDG_SESSION_TYPE"] = "wayland"41 values["XDG_SESSION_TYPE"] = "wayland"
42+ // X11 apps (through Xwayland) and toolkits pick their own cursor size:
43+ // give them the compositor's, 24 unless set.
44+ if values["XCURSOR_SIZE"] == "" {
45+ values["XCURSOR_SIZE"] = "24"
46+ }
42 keys := make([]string, 0, len(values))47 keys := make([]string, 0, len(values))
43 for key := range values {48 for key := range values {
44 keys = append(keys, key)49 keys = append(keys, key)
M internal/adapters/launcher/launcher_test.go +2 -2
@@ -13,8 +13,8 @@ import (
1313 )
1414
1515 func TestChildEnv(t *testing.T) {
16- got := ChildEnv([]string{"TERM=x", "DISPLAY=:0", "WAYLAND_SOCKET=4", "WAYLAND_DISPLAY=old", "HOME=/home/me", "PATH=/bin", "LC_ALL=C", "XDG_RUNTIME_DIR=old", "SECRET=bad"}, "wayland-7", "/run/me")
17- want := []string{"HOME=/home/me", "LC_ALL=C", "PATH=/bin", "WAYLAND_DISPLAY=wayland-7", "XDG_CURRENT_DESKTOP=nefertty", "XDG_RUNTIME_DIR=/run/me", "XDG_SESSION_TYPE=wayland"}
16+ got := ChildEnv([]string{"TERM=x", "DISPLAY=:0", "WAYLAND_SOCKET=4", "WAYLAND_DISPLAY=old", "HOME=/home/me", "PATH=/bin", "LC_ALL=C", "XDG_RUNTIME_DIR=old", "XCURSOR_THEME=Adwaita", "SECRET=bad"}, "wayland-7", "/run/me")
17+ want := []string{"HOME=/home/me", "LC_ALL=C", "PATH=/bin", "WAYLAND_DISPLAY=wayland-7", "XCURSOR_SIZE=24", "XCURSOR_THEME=Adwaita", "XDG_CURRENT_DESKTOP=nefertty", "XDG_RUNTIME_DIR=/run/me", "XDG_SESSION_TYPE=wayland"}
1818 if !reflect.DeepEqual(got, want) {
1919 t.Fatalf("got %v want %v", got, want)
2020 }
@@ -13,8 +13,8 @@ import (
13 )13 )
14 14
15 func TestChildEnv(t *testing.T) {15 func TestChildEnv(t *testing.T) {
16- got := ChildEnv([]string{"TERM=x", "DISPLAY=:0", "WAYLAND_SOCKET=4", "WAYLAND_DISPLAY=old", "HOME=/home/me", "PATH=/bin", "LC_ALL=C", "XDG_RUNTIME_DIR=old", "SECRET=bad"}, "wayland-7", "/run/me")16+ got := ChildEnv([]string{"TERM=x", "DISPLAY=:0", "WAYLAND_SOCKET=4", "WAYLAND_DISPLAY=old", "HOME=/home/me", "PATH=/bin", "LC_ALL=C", "XDG_RUNTIME_DIR=old", "XCURSOR_THEME=Adwaita", "SECRET=bad"}, "wayland-7", "/run/me")
17- want := []string{"HOME=/home/me", "LC_ALL=C", "PATH=/bin", "WAYLAND_DISPLAY=wayland-7", "XDG_CURRENT_DESKTOP=nefertty", "XDG_RUNTIME_DIR=/run/me", "XDG_SESSION_TYPE=wayland"}17+ want := []string{"HOME=/home/me", "LC_ALL=C", "PATH=/bin", "WAYLAND_DISPLAY=wayland-7", "XCURSOR_SIZE=24", "XCURSOR_THEME=Adwaita", "XDG_CURRENT_DESKTOP=nefertty", "XDG_RUNTIME_DIR=/run/me", "XDG_SESSION_TYPE=wayland"}
18 if !reflect.DeepEqual(got, want) {18 if !reflect.DeepEqual(got, want) {
19 t.Fatalf("got %v want %v", got, want)19 t.Fatalf("got %v want %v", got, want)
20 }20 }

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