Announcement

Collapse
No announcement yet.

Bringing an existing window to the fore in Wayland

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [SOLVED] Bringing an existing window to the fore in Wayland

    With X11, I can use a keyboard shortcut bound to
    Code:
    wmctrl -xa konsole || konsole
    to launch konsole or to bring its window to the foreground if it's already open.

    Is something similar in Wayland?
    Kubuntu 20.04

    #2
    No, or probably not for Kwin. that is. This sort of feature (allowing one application to read another's input via the display server) is not supported in Wayland itself, so the window managers need to implement something to control windows in this manner, as I understand it.
    I am sure there is some fairly simple scripting that could do this, which could be bound to a keystroke.

    Older, and not sure if these work with kwin but : https://unix.stackexchange.com/quest...e-command-line
    Both are available in Ubuntu



    My original, glib answer is to Just Install Yakuake

    Comment


      #3
      Originally posted by claydoh View Post
      ...
      I am sure there is some fairly simple scripting that could do this, which could be bound to a keystroke.

      Older, and not sure if these work with kwin but : https://unix.stackexchange.com/quest...e-command-line
      Both are available in Ubuntu



      My original, glib answer is to Just Install Yakuake
      Thanks! I'll look out for suitable scripts and take a look at what ydotool has to offer for "pure" wayland apps and whether wmctrl will still work for xwayland apps.

      Re. Yakuake, I mentioned konsole as an example. I use similar code for several other applications as well.
      Kubuntu 20.04

      Comment


        #4
        Problem solved:

        The solution, for me, is to pin my frequently used applications to the task manager. I can launch them using meta+1, meta+2, up to meta+9 (and even a tenth entry).

        If the application isn't running, pressing the relevant meta+n combo launches it. If the application is running, any of these applications' window is minimized, pressing the relevant meta+n combo brings it to the fore.

        If I access the application through krunner or the application launcher, I could end up with additional windows/tabs if the application is already running. So, I'll avoid that route for pinned applications.

        (This isn't Wayland-specific. It's there in Plasma X11 as well. I never bothered with pinning applications because I could use wmctrl.)

        The only drawback is that there's very little contrast between the background/highlighting of an icon if it's pinned but not running versus if it's running but its window is minimized. I like to close all running applications before shutdown. So I'll have to get used to an Alt+Tab check in each virtual desktop.
        Kubuntu 20.04

        Comment

        Working...
        X