spacebar icon indicating copy to clipboard operation
spacebar copied to clipboard

Request: Run two instances

Open johnallen3d opened this issue 3 years ago • 2 comments

Now that we have the ability to do things like hide/show application titles and show shell output (thanks @cmacrae!) I'm interested in running two bars. One on top showing the traditional stuff and one on bottom showing more custom shell output.

I thought maybe I could run two instances but when I try to fire up a second instance I get a lock file error.

spacebar: could not acquire lock-file! abort..

That makes sense as I'm sure I'm trying to use it in a non-standard way. My question is could spacebar support this in the future?

johnallen3d avatar Mar 31 '21 19:03 johnallen3d

Sure! That could indeed be a feature 👍🏻

spacebar already displays multiple bars based on the presence of multiple displays. This could probably quit easily be moulded to accommodate 2 bars on one display :)

I'll look into this - the next thing I'm looking at is quite similar, so I'm sure I'll be in the right mindset to tackle this too!

Thanks for the continued support and feature request @johnallen3d

cmacrae avatar Mar 31 '21 20:03 cmacrae

To whoever needs this, I found that the lock file is based on the USER env var: https://github.com/cmacrae/spacebar/blob/8431008fcf97ba57228a21d212bfd1738db6e7c9/src/spacebar.c#L2 https://github.com/cmacrae/spacebar/blob/8431008fcf97ba57228a21d212bfd1738db6e7c9/src/spacebar.c#L183

Which of course can be easily set. The other part is that brew doesn't play very well with running multiple instances, so I found easier to just create my own plist file and launchctl load it. For reference you can copy the original one from ~/Library/LaunchAgents/homebrew.mxcl.spacebar.plist.

eh-am avatar Jan 18 '23 16:01 eh-am