Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Opened new tabs in existing terminal no longer makes the terminal grab focus (focus stays in nautilus) #189

Open
arigit opened this issue Sep 13, 2024 · 4 comments

Comments

@arigit
Copy link

arigit commented Sep 13, 2024

Since I upgraded my desktop to Ubuntu 24.01.1 (LTS) / GNOME 46 and switched to a Wayland desktop, nautitlus-open-any-terminal (latest master as of now) works but has a problem.

with this configuration:

image

right clicking on any script in nautilus and "Executing in Ptyxis" opens a new tab in the existing ptyxis window and runs the script however the Window focus remains in Nautilus. Before (on ubuntu 22.04 / X11 environment) the new tab always got the focus.

This is kind of annoying as I usually run interactive scripts this way. Can the same old behavior be implemented on modern wayland/gnome? (or: make the focus behavior configurable)

@arigit
Copy link
Author

arigit commented Sep 13, 2024

I tested with two different terminals, ptyxis (flatpak) and tilix (deb package), both have the same problem, the new tabs do not grab the focus.

I tried to test with gnome-terminal as well but the "new tab" functionality of nautilus-open-any-terminal does not work with it for some reason.

@arigit
Copy link
Author

arigit commented Sep 14, 2024

Hi, I tested with various different terminal apps, in X11 it works, the new tab is created in the terminal, and focus shifts from nautilus to the terminal app / new tab.

In Wayland, the new tab is created and the command runs in it but focus gets stuck in nautilus, no matter what terminal app you are using. This is not a terminal app setting I believe, at least I couldn't find one. There must be a way to tell Wayland to move the focus to the terminal window.

This app (gnome shell extension) is able to raise specific windows if they exist and set focus to them, or create new ones and set the focus, and works perfectly on both Wayland and X11, so somehow this is doable in wayland: https://github.com/CZ-NIC/run-or-raise

@arigit
Copy link
Author

arigit commented Sep 14, 2024

See here how they set the focus to the gnome-shell window they want:

https://github.com/CZ-NIC/run-or-raise/blob/main/lib/action.js

it's in javascript though

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@arigit and others