A person, on the Gnome Issue, suggested that terminals inhibit sleep when there is stuff running in them.
Continuing from that discussion, I am trying to understand, at which point it would be desirable to implement said inhibition - terminal emulator, the shell or the program itself
Additionally:
- We want to inhibit when running stuff like
pacman
,wget
,cp
ormv
- We don’t want to inhibit when running stuff like
htop
,less
,watch
It can’t be the terminal that decides what inhibits and what doesn’t. It must be the user or programs themselves.
How would implementing it in the terminal rather than shell look like? As a user choice? I don’t see how that’s reasonably possible.
Reading the other comments it seems like there’s already inhibit commands.
If the shell does not provide a command or alias, or they can’t because the inhibit API is system dependent, it’s on the user to define. The user could define a
fg
alias or command, fg for foreground, which executes the command with inhibition.