baskerville / bspwm

A tiling window manager based on binary space partitioning
BSD 2-Clause "Simplified" License
7.72k stars 415 forks source link

Enforce only one instance of an application #541

Closed alecive closed 7 years ago

alecive commented 7 years ago

Hey @baskerville ,

I would like to know if it would be possible to enforce bspwm launch an application only once. The behavior I am envisioning is similar to one of the few things I like about Ubuntu Unity, and I would like to replicate it with bspwm. Namely, I would like to have a shortcut to launch an application (which is possible), and then to focus on the application if the application itself has been already launched. I don't know if the latter is achievable as of now, though.

Generally speaking, this use case would be useful with all the applications that do not necessarily require multiple instances. For example, I would use it with my favourite chat app, with the browser, or with anything that is rarely needed and that can be lost into some of the many workspaces.

baskerville commented 7 years ago

Yes: xdo activate -N ClassName || program.

alecive commented 7 years ago

This is great! I'm loving bspwm every day a little more. Thanks!