2

In this question a script is provided, that minimizes all the other windows except the active one. But the thing is, to trigger this script a (shortcut) key-combination has to be pressed.

I would love it, if it would be possible to automate this behavior, i.e. no matter what I do, only the active window is not minimized. This way I cannot view more then one open window at the same tine, which is what I'm after. Is it possible to write a script, that does this ?

I a question I asked a while ago (where I learned about the above script), someone said, the proper way to do this, would be through a wrapper through which every program starts.

I would also be very happy with a more sloppy solution, like activating this script 100 times per second (simulating pressing the shortcut combination a 100 times per second), if it is feasible - although I was warned, that that may not be a very good idea.

l7ll7
  • 395

1 Answers1

3

You could use cron to schedule the call of your script, but cron can only run a script every minute. It can't go faster than this, so it is probably not fast enough for your use.

It sounds like a really bad idea to run every few milliseconds, but if that's what you really want you can run the script below in the background:

while true; do
    /path/to/your/script.sh 
    sleep 0.01
done
Ugo
  • 390