Coder Social home page Coder Social logo

[BUG] -window-command ignored about rofi HOT 4 OPEN

ckudera avatar ckudera commented on August 12, 2024
[BUG] -window-command ignored

from rofi.

Comments (4)

LRitzdorf avatar LRitzdorf commented on August 12, 2024 1

Returning the PID might be a viable option (maybe along with a new "pattern", like {pid})?

I came across this for Hyprland, which supports acting on windows by PID; not sure if Sway and others do the same.

from rofi.

alebastr avatar alebastr commented on August 12, 2024

-window-command was omitted from the initial implementation as {window} is an X11 window ID and there's no matching concept for Wayland. Running a command without any way to identify the selected window isn't very useful.

Two main blockers for the functionality:

  • ext-foreign-toplevel-list protocol is already merged and introduces the concept of ext_foreign_toplevel_handle_v1.identifier, an unique and stable identifier for a toplevel, but there are no compositor implementations yet. Maybe wlroots 0.18 somewhere next year will add it.
  • ext-foreign-toplevel-state and ext-foreign-toplevel-management protocols to allow actually getting the window info and manipulating it (focus, close, etc) are stuck in the usual wayland-protocols review process.

from rofi.

ckudera avatar ckudera commented on August 12, 2024

@alebastr Thanks for the fast reply. Is there any way to execute a custom script for a window at the moment? Maybe the unique node id (swaymsg --raw -t get_tree) could be a replacement for the window ID?

from rofi.

alebastr avatar alebastr commented on August 12, 2024

Unfortunately, that info is not available to the module. The implementation does not use Sway specific IPC.

Window title and app_id is all we have, although I'm hesitant to allow using these for scripting and introduce even more divergence with XCB window behavior. If it gets into the code as a temporary solution, it's going to stay here forever :(

from rofi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.