Skip to content

Make focused window widget more useful #2747

Description

@shaplyd

Feature Description

Click to show often used information like app ID, title and pid to quickly copy or perform action like kill or add window rule.

Use Case

Would be immensely useful and reduce tedium of needing to manually copy and paste app id and title 50 times for making window rules.
or scrolling through menus to find the correct window in the window rule manager in dms settings or to kill a program from system monitor.
Particularly annoying for flatpaks and PWAs.
Would make the widget more useful for vertical bar where it is just a pretty icon now.

Compositor(s)

All compositors

If Other, please specify

No response

Proposed Solution

left-click to open a more detailed menu with clickable title, app id, pid to copy.
Button next to pid for kill.
Button to add to window rules.

Alternatives/Existing Solutions

for Niri I do

    Mod+Alt+P repeat=false {
        spawn-sh r#"
OUT=$(niri msg focused-window) && \
    kitty -o hide_window_decorations=yes -o confirm_os_window_close=0 --class 'focused-window' \
        sh -c 'printf "\033[?25l"; printf "%s\n" "$1"; read -n 1 -s' _ "$OUT"
        "#;
    }


window-rule {
    match app-id=r#"^focused-window$"#

    open-floating true
    open-focused false
    default-floating-position x=4 y=4 relative-to="top-left"
    default-column-width { fixed 380; }
    default-window-height { fixed 320; }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions