Skip to content

Hot-reload fails to apply keybinding changes without full logout/login session restart #67

Description

@ffs-akl

When modifying keybindings in the configuration file (e.g., changing a binding from Super+F to Super+E), the hot-reload mechanism does not pick up the updated key configuration. The new keybinding only becomes effective after completely logging out and logging back into the session.

Configuration Snippet

COMPOSITOR.onDisable((event) => {
  if (event.isReloading) {
    const snapshot = HYBRID_WINDOW_MANAGER.snapshot();
    event.persist(HOT_RELOAD_WINDOW_MANAGER_STATE, snapshot);
  }
  HYBRID_WINDOW_MANAGER.dispose();
});

COMPOSITOR.onEnable((event) => {
  if (event.isReloading) {
    const snapshot = event.restore<
      ReturnType<typeof HYBRID_WINDOW_MANAGER.snapshot>
    >(HOT_RELOAD_WINDOW_MANAGER_STATE);
    if (snapshot) {
      HYBRID_WINDOW_MANAGER.restore(snapshot);
    }
  }
});

// Modified keybinding that fails to hot-reload
COMPOSITOR.key.bind("nautilus", "Super+E", () => {
  COMPOSITOR.process.spawn({ command: "nautilus" });
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions