Xinkai / kwin-wezterm-toggle

kwin script that shows & hides WezTerm via global hotkey
MIT License
6 stars 0 forks source link

Showing/Hiding Wezterm does not work when there is no other Window #1

Open SuperSandro2000 opened 1 month ago

SuperSandro2000 commented 1 month ago

When I log into my desktop, start Wezterm and then toggle the shortcut, it only gets hidden but never re-appears.

Xinkai commented 1 month ago

It's working for me.

  1. "Not showing" may be an illusion. Wezterm window may be positioned outside the screen. This happens to me as well after connecting/disconnecting external monitors. If this is indeed the case, hit "Alt+F3" when you think Wezterm is up, you can try maximizing the window from there.

  2. If the issue was not an illusion. I'll need more info.

    • verify your KDE versions. Here's mine.
      $ plasmashell --version && kwin_wayland --version
      plasmashell 6.1.2
      kwin 6.1.2
    • the output while you hit the shortcut for a few cycles? Mine looks like:
      $ journalctl --user --boot 0 --follow --identifier kwin_wayland
      Jul 15 12:00:56 kwin_wayland[1165]: js: WezTermToggle 0.15 minimized!
      Jul 15 12:00:56 kwin_wayland[1165]: js: WezTermToggle 0.15 setting oldActive firefox
      Jul 15 12:00:57 kwin_wayland[1165]: js: WezTermToggle 0.15 not minimized!
      Jul 15 12:00:57 kwin_wayland[1165]: js: WezTermToggle 0.15 showing oldActive firefox
      Jul 15 12:01:07 kwin_wayland[1165]: js: WezTermToggle 0.15 minimized!
      Jul 15 12:01:07 kwin_wayland[1165]: js: WezTermToggle 0.15 setting oldActive firefox
      Jul 15 12:01:14 kwin_wayland[1165]: js: WezTermToggle 0.15 not minimized!
      Jul 15 12:01:14 kwin_wayland[1165]: js: WezTermToggle 0.15 showing oldActive firefox
      Jul 15 12:01:17 kwin_wayland[1165]: js: WezTermToggle 0.15 minimized!
      Jul 15 12:01:17 kwin_wayland[1165]: js: WezTermToggle 0.15 setting oldActive firefox
    • additional information related to display such as multiple monitors, DPI on each monitor, etc.
SuperSandro2000 commented 1 month ago
  1. "Not showing" may be an illusion. Wezterm window may be positioned outside the screen. This happens to me as well after connecting/disconnecting external monitors. If this is indeed the case, hit "Alt+F3" when you think Wezterm is up, you can try maximizing the window from there.

Nope, it is really gone. I can always reproduce it with the following steps.

Ctrl+F12 is the hotkey I set in the script.

verify your KDE versions. Here's mine.

same for me on NixOS

$ plasmashell --version && kwin_wayland --version
plasmashell 6.1.2
kwin 6.1.2

additional information related to display such as multiple monitors, DPI on each monitor, etc.

I have a single monitor on my standard 1080p Laptop. Nothing fancy, no secondary display. Just 4 desktops.

and the log output:

Jul 15 20:41:13 magnesium kwin_wayland[9813]: js: WezTermToggle 0.15 not minimized!
Jul 15 20:41:13 magnesium kwin_wayland[9813]: js: WezTermToggle 0.15 minimized!
Jul 15 20:41:13 magnesium kwin_wayland[9813]: js: WezTermToggle 0.15 minimized!
Jul 15 20:41:13 magnesium kwin_wayland[9813]: js: WezTermToggle 0.15 minimized!
Jul 15 20:41:14 magnesium kwin_wayland[9813]: js: WezTermToggle 0.15 minimized!
Jul 15 20:41:14 magnesium kwin_wayland[9813]: js: WezTermToggle 0.15 minimized!
Jul 15 20:41:14 magnesium kwin_wayland[9813]: js: WezTermToggle 0.15 minimized!
Jul 15 20:41:14 magnesium kwin_wayland[9813]: js: WezTermToggle 0.15 minimized!
Jul 15 20:41:14 magnesium kwin_wayland[9813]: js: WezTermToggle 0.15 minimized!
Jul 15 20:41:14 magnesium kwin_wayland[9813]: js: WezTermToggle 0.15 minimized!
Jul 15 20:41:14 magnesium kwin_wayland[9813]: js: WezTermToggle 0.15 minimized!
Jul 15 20:41:15 magnesium kwin_wayland[9813]: js: WezTermToggle 0.15 minimized!
Jul 15 20:41:15 magnesium kwin_wayland[9813]: js: WezTermToggle 0.15 minimized!
Jul 15 20:41:15 magnesium kwin_wayland[9813]: js: WezTermToggle 0.15 minimized!
Jul 15 20:41:16 magnesium kwin_wayland[9813]: kwin_libinput: Libinput: event12 - Elan Touchpad: kernel bug: Touch jump detected and discarded.
                                              See https://wayland.freedesktop.org/libinput/doc/1.26.0/touchpad-jumping-cursors.html for details
Jul 15 20:41:16 magnesium kwin_wayland[9813]: js: WezTermToggle 0.15 minimized!
Jul 15 20:41:16 magnesium kwin_wayland[9813]: js: WezTermToggle 0.15 setting oldActive plasmashell                                                                                            Jul 15 20:41:18 magnesium kwin_wayland[9813]: This plugin does not support raise()
Xinkai commented 1 month ago

I see.

Are you using activities, virtual desktops, or other KWin advanced window managing features? I don't use any of these, and I think it may be the cause.

Can you try disabling these one at a time to see where the incompatibility lies?