Rof - a script to avoid launching multiple instances of the same window

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.

Type rof -h for info on how to use.


  1. Haven’t I reinvented the wheel? Possibly this could have been achieved in another, simple way?
  2. If not: does the script work well enough for you? No bugs?
  3. If so: should it be published in AUR?

Top job again @nwg . Thx for sharing.

1 Like

Finally I published the script in AUR, as rof-git. Thanks in advance for your votes. Even more for feedback. :slight_smile:

1 Like

Look forward to that man, love tint2 w/polbar.


I intended to publish them all as a single package, but it seems to make no sense. One will always need to add Tint2 executors and adjust them to their taste. Surely I could add an ‘autoconfig’ script, as I did in obhud, but newbies are likely to understand nothing, and more advanced users don’t need it. These scripts should either come pre-installed, or be aimed at advanced users.

It seems the only I can do (and actually I’m doing right now) is to provide a “dummy” package, which will install all dependencies in one step.


Top job in there @nwg

1 Like

@nwg I wouldn’t be shy about it man, you can’t share enough. I’ve been around since the beginning of #! but still and always will consider myself a noob. If someone thinks they’re not a noob… More power to them & perhaps they should be lookin’ for a more challenging hobby. :slight_smile:

No idea what could be more a challenge than tweaking a niche WM on a niche distribution of a niche OS. :smiley: However, being still and forever a greenhorn, I understand that people coming from Windows have no idea on how to customize Tint2, and don’t really care. If they want such extensions, the should be able to turn then on in one simple step.

Tint2 is tint2, doesn’t really matter unless the call is specific but that’s easy enough to change.

Well, having installed AL on the netbook, I added all my executors in about 10 minutes, just following my own Wiki. :slight_smile:


That s what I call a fast install in there, congrats @nwg

1 Like