Skip to content

[FEATURE] window instance support #1416

@gnnikto

Description

@gnnikto

Description of the requested feature

It would be great if we could access to window instance via eww, or access to window instance from itself

[WAYLAND]
At the moment, eww windows have no concept of an instance identifier.
When the same window is opened multiple times using:

eww open my_window
eww open my_window

eww creates multiple GTK window instances, but:
instances are not identifiable
there is no way to reference a specific instance
eww close my_window only affects one instance
eww close-all does not reliably close all instances
orphaned windows remain alive and unmanageable
Windows react to yuck change(all instances), which confirms that instances is controlled by daemon, but they are not addressable via eww

Proposed configuration syntax

  1. Window instance ID
    Each window instance should have a unique ID.
    Possible ways to expose it:
    return ID from open
Handle=$(eww open my_window)
eww close -id $Handle

or make it accessible inside yuck (e.g. window.id)
or expose it via
eww active-windows --id
and then
eww close -id <window_id>

  1. Allow a instance to close itself, without knowing its name or ID explicitly.
(button
  :onclick "this.close"
)

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions