While playing with my collection of Tint2 executors (which I have not yet formally introduced here), one of things I hated most was that commands assigned to mouse events used to execute again and again after each click, even if previous instances were already running. For instance: the volume icon left- and right-clicked thee times would give me something like this:
The behavior I expected was: launch the command if not yet running, else just bring focus to the command window. Having no idea on how to achieve this with existing bash commands, today I wrote a short launcher script, called
rof (Run Or set Focus). Now the commands open their windows once, no matter how many times you click:
You may find the script
here. Preferably it should be marked executable and placed in /usr/bin. For lazy people I prepared PKGBUILD in the rof_pkg folder. Or you can just download and install the package from the same location in AUR.
rof -h for info on how to use.
- Haven’t I reinvented the wheel? Possibly this could have been achieved in another, simple way?
- If not: does the script work well enough for you? No bugs?
If so: should it be published in AUR?