Reopen last closed window on Gnome

In Firefox, you can press ctrl-shift-T to open the last closed tab, is something like that possible for Windows in Gnome?

There is not, but using wmctrl, you can grab the PID's of open windows, which you can use to re-open a closed window.

sudo apt install wmctrl

wmctrl -l

Reopen with

ps -o cmd= (REPLACE-WITH-PID)

1 Like

But once I close the window, I can't get the PID anymore?

This is true, which is why you would need to grab the PID's, first. Taking a look around, this user suggests a script that grabs them for you on a loop:

1 Like

Thanks!
I just saw a tutorial on how to make a gnome extension, and it did not seem that difficult.
Maybe I'll try to make this an extension when I find some time.

Marked solution. 264

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.