This might be simple but I cant think of an easy way to create the following behavior:
- launch a gui app (say gimp) from a terminal emulator (e.g alacritty)
- have the gui app temporarily replace the terminal window (rather than leave it hanging around) and pass focus to the gui app
- then upon exit of said gui app have it return to the same terminal session showing the gui apps std output and all history and put the focus back
Ideally I want to be able to do this as an alias for specific applications but I'm open to other options. If its not simple maybe someone can point me in the right direction to RTFM
alias gimp='gimp && gnome-terminal & exit'
... No output history though (either use a terminal multiplexer likescreen
or redirect output to a file and restore it later) ... That also might not open a new terminal upon exit if there is another one already open ... this although not directly related, but can be useful with e.g.tput
– Raffa Oct 15 '23 at 06:07