Skip to content

Fix Super+Arrow keyboard tiling: write to /xfwm4/custom/#24

Merged
kimptoc merged 2 commits intokimptoc:claude/fix-xfce-wallpaper-FK5rhfrom
cattyclaw-bot:claude/fix-xfce-wallpaper-FK5rh
May 4, 2026
Merged

Fix Super+Arrow keyboard tiling: write to /xfwm4/custom/#24
kimptoc merged 2 commits intokimptoc:claude/fix-xfce-wallpaper-FK5rhfrom
cattyclaw-bot:claude/fix-xfce-wallpaper-FK5rh

Conversation

@cattyclaw-bot
Copy link
Copy Markdown
Contributor

@cattyclaw-bot cattyclaw-bot commented May 4, 2026

Summary

Two commits, both fixing the xfwm4 Super+Arrow keyboard tiling on the Code Club live CD. End-to-end verified on a real live-ISO boot — all 8 keyboard tile combos now fire correctly.

3ebd971 — Write to /xfwm4/custom/, not /xfwm4/default/. The earlier "move to default" theory (97c7365) was inverted: this NixOS xfwm4 image has /xfwm4/custom/override = true, so Custom is the live key theme and xfwm4 silently ignores anything under default. Confirmed live with xev: Super+Left flowed through to applications with state=Mod4Mask untouched (no XGrabKey installed). Adds per-binding readback into the autostart log so silent xfconf no-ops can't hide again.

59d9307 — Defuse stock numpad collisions, scrub stale types. Even after #1, 4 of 8 bindings (Right, Down, Ctrl+Left, Ctrl+Right) still silently failed to grab on a fresh boot. Two extra defenses:

  1. Delete the four /xfwm4/custom/<Super>KP_{Right,Down,End,Next} numpad siblings before our writes. xfwm4 4.20 stores ONE binding per action enum (screen_info->params->keys[KEY_*]); when two custom-tree paths share a tile_*_key, the runtime cb_shortcut_added installs only one grab, and not necessarily ours. With both <Super>Right and <Super>KP_Right pointing at tile_right_key, Super+Right ended up not grabbed at all. Code Club kit has no numpads, so removing the four sibling entries is a non-regression.
  2. Reset (-r) each target path before -n create. -n is no-op when the property exists with any type — and we hit a case where /xfwm4/custom/<Super>Down had been promoted to an array [tile_down_key,tile_down_left_key] (likely from xfwm4-settings GUI fiddling on a previous live-CD test). xfwm4 silently can't parse arrays as bindings → no grab. -r before -n guarantees a clean string property.

Test plan

  • Boot ISO on a real machine
  • Super+Left tiles left half
  • Super+Right tiles right half
  • Super+Up maximises
  • Super+Down tiles bottom half
  • Super+Alt+Left/Right tile top corners
  • Super+Ctrl+Left/Right tile bottom corners
  • ~/myautostart.log shows each /xfwm4/custom/<Super>... binding with its action value (the readback)

🤖 Generated with Claude Code

cattyclaw-bot and others added 2 commits May 4, 2026 12:33
The previous "move to /xfwm4/default/" theory (97c7365) was inverted.
On this NixOS xfwm4 image /xfwm4/custom/override is true at first
login, making "Custom" the live key theme — xfwm4 reads bindings only
from /xfwm4/custom/ and silently ignores anything under
/xfwm4/default/. xfconf accepted our default-tree writes, but xfwm4
never grabbed the keys: verified live with xev, which showed
Super+Left flowing through to applications with state=Mod4Mask
untouched (no XGrabKey installed for it).

The stock <Super>KP_* numpad tile bindings ship in /xfwm4/custom/
already, which is why those always worked while the regular-arrow
bindings we kept adding to default never did.

Drop the -r reset dance (these regular-arrow paths don't pre-exist
in /xfwm4/custom/ on a fresh boot, so plain -n create is sufficient
and idempotent).

Add per-binding readback echoed into the autostart log via a small
bind_xfwm4 helper. The old "xfwm4 Super+Arrow tile keys bound" line
was an unconditional echo, not a status check, which hid silent
xfconf no-ops through three iterations of this fix. Future logs
will show which bindings took and which didn't, in one place.

Verified live by writing the same bindings to /xfwm4/custom/ via
xfconf-query on a running ISO: Super+Left/Right tile, Super+Up
maximises, Super+Down tiles bottom-half.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Previous attempt (3ebd971) wrote bindings to /xfwm4/custom/ correctly
but 4 of 8 still silently failed to grab on a fresh boot. Two extra
defenses make this reliable:

1. Delete the four /xfwm4/custom/<Super>KP_{Right,Down,End,Next}
   numpad siblings before writing our regular-arrow bindings. xfwm4
   4.20 stores ONE binding per action enum (one slot in
   screen_info->params->keys[KEY_*]) — when two custom-tree paths
   point at the same tile_*_key, its runtime cb_shortcut_added
   installs only one grab, and not necessarily ours. Verified live
   with xev: with both <Super>Right and <Super>KP_Right pointing at
   tile_right_key, Super+Right reached applications with state=
   Mod4Mask untouched (no XGrabKey for it). Removing the numpad
   siblings is a non-regression — Code Club kit has no numpads.

2. Reset (-r) each target path before -n create. -n is no-op when
   the property already exists with ANY type, and we hit a case
   where /xfwm4/custom/<Super>Down had been promoted to an array
   [tile_down_key,tile_down_left_key] (origin unclear, likely from
   xfwm4-settings GUI fiddling on a previous live-CD test). xfwm4
   silently can't parse arrays as bindings → no grab. -r before -n
   guarantees a clean string property.

Verified the runtime equivalent of these two changes on the live
ISO: deleting the four KP_* siblings, then -r/-n-rewriting the
Super+Down array, made all 8 keyboard tiling combos fire correctly.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@kimptoc kimptoc merged commit c1a27db into kimptoc:claude/fix-xfce-wallpaper-FK5rh May 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants