Keeping Scripts (and More) In Sync

###Syncing LaunchBar
AFAIK, LB does not directly (officially) support syncing among Macs.
But it appears that it could be done using a symlink.
I have NOT does this, so I can’t vouch for this method.

See:
Dropbox synchronization - LaunchBar Forum

Yes that’s what I was reading. As I understand it the caveat is that you
cannot have LaunchBar open on both macs at once… which is my use case :slight_smile:
I’ll have to do it manually I guess. Thank you!

If you have any of the apps/files that you are syncing, like KM for example, open on more than one Mac you are risking conflicts, maybe even corruption.

I have two Macros I always run when I switch Macs:

  • Sleep – quits all apps and disconnects all external drives, then puts the Mac to sleep.
  • Wake – auto-runs when the Mac is waken from sleep or is started/restarted. If my std apps are not running, then it opens these apps, and does some other stuff.

I think, what manfred means with “use” is ‘actively using LB’.

When you are (actively) using LB it will update the Habits.plist file in ~/Library/Application Support/LaunchBar/. This is the file that gets updated when LB “learns” your typed abbreviations (not the fix abbreviations). So, of course, when you are typing something into LB at the same time on both machines you’ll have a sync conflict.

However, when LB is just open on both machines (running in the background, not actively used) then the only thing that gets updated – AFAIK – is the index. The index is located in ~/Library/Caches/at.obdev.LaunchBar, and you are not syncing it.

1 Like

Another thought:

Because of the aforementioned Habits file I would be hesitant to sync the whole ~/Library/Application Support/LaunchBar/ folder across machines. Since you most likely have different file paths and applications on different machines, logic says that by syncing you will contaminate the Habits file with invalid/undesired entries.

So, maybe the best would be to just sync specific files/folders in ~/Library/Application Support/LaunchBar/ , for example Actions, Snippets, etc.

On the other hand, if configuration and file structure of your both machines is quite the same, it may be desirable to have the Habits file synced…

1 Like

Both macs have the same username, and dammed near the same set of applications. I think they would only differ in desktop/documents contents, which is usually a handful of files at most (since I keep nearly everything in Dropbox). I wonder if that’s similar enough?

After ensuring both macs have exactly the same apps, I think I will try archiving and then syncing the entire Application Support folder and see how that goes. If it fouls things up I will restore the folder and then sync only the Actions, Snippets, etc.

That’s not even necessary. (The Habits file stores paths with the tilde (~), not with the explicit username.)

Would be great if you report back your experiences. (I have never seriously synced LB with another Mac, but that’s probably because I work 95% of the time on only one Mac.)

Would you mind sharing (some version) these?

Sure. I’ll try to post them tomorrow after I’ve cleaned them up a bit.

1 Like

@Tom, a follow-up LaunchBar question, if you don’t mind:

I want to do something similar to your “Option 1”, but start with the file I want to create an alias to.

Maybe LB is not the best tool for this, but here is what I want to do:

  1. Activate the Finder
  2. Either select a file directly, or do a search first.
  3. IAC, from the list in the Finder, select one or more files
  4. Select a destination Folder
  5. Create alias(es) for the selection in the destination folder (but NOT in the source folder).

I was about ready to start writing a script to do this, and thought perhaps LB could do it. My biggest challenge/concern with LB, is how to quickly find/select the destination folder.

Your (and others) thoughts?

Then, Option 2 is for you.

Obviously, Option 2 as I have described it in the previous post, was entirely without Finder input. But , no problem, you can get the same thing parting from a Finder selection instead of a LB selection:

  1. In the Finder select the file which should be the target of the Alias (or Symlink or whatever)
  2. Press your Instant Send key (as set in LB’s prefs)
  • The LB window comes up and your Finder-selected file is focused in the LB window
  1. In the LB window, press the Tab key
  2. Then (still in LB) navigate to the destination folder (via Arrow keys or via abbreviations)
  3. Once you have found the destination folder, hit Return
  • You will be presented with the usual Copy/Move/Alias/Symlink/Hardlink prompt
  1. Make your selection, either via Arrow key up/down, or via number key + Return, or via long-press of number key.

To sum it up:

It’s like Option 2 from the previous post, just with the difference that the starting point is a Finder-selected item (instead of a LB-selected item).

It is important to understand the “Send” concept of LaunchBar:

“Send” is like: Take the subject and apply an argument.

You can invoke a Send either via…

  • the Instant Send key (usually when the subject is a Finder-selected item)
  • the Tab key (usually when the subject is already selected in LB)

In many (or: most of the) cases the argument is either…

  • An application: that is: you select a document file in the Finder > you hit the LB Instant Send key > you select the app to open the document with.
  • or, as in this topic, the subject is an arbitrary file, and the argument is the destination folder where you want to send it to (as Copy/Alias/Symilnk/Hardlink, or moving to)

Edit/PS:

Besides that you can also select arbitrary text (e.g. on a web page, or in any document) > hit the Instant Send key > pass it to a specified action, or e.g. to a web search, etc.

Per your request, I just posted:
Macro Set: (1) Put Mac to Sleep; (2) Prepare Mac On Wake

If you have any questions about these, feel free to post in the above topic.

1 Like

Just chiming in to say that "sending" may well be the single most useful aspect of LaunchBar. I easily use it more than any other of its many features.


I've also been keeping my LaunchBar support folder in sync using Dropbox via the method described here for years, and even though it's not officially supported and you have to manage each Mac's catalog separately, in my experience it does a perfectly reasonable job of keeping your habits and abbreviations in sync.

Well said :blush:

The other “single” most useful thing is that in LB you can assign abbreviations. I.e., not just modifier-key+X, but real, semantical, abbreviations. AFAIK no other tool allows this.

Thanks, Tom.

Unfortuantely, I'm still not getting it, or doing somethilng wrong.

@Tom or @gglick:

I did this:

  1. Select a file in Finder
  2. Double-tap CONTROL to instant send to LB
  3. The file name appeared in the LB prompt
  4. I pressed TAB, and selected a Folder
  5. I pressed RETURN, and selected "Make Alias", and pressed RETURN

It did NOT make an alias. It just copied the file to the selected folder.
(see EDIT below).

What am I doing wrong?


EDIT:  2017-03-15  8:00 PM CT

* Sorry, I'm an idiot. Made (another) newbie error.
* It created the alias, but without the word "alias" at the end of the file name, like it does in Finder.
* I initially overlooked  the tiny, tiny arrow in the file icon that indicates an alias.

It’s not a bad idea to “overlook” this, because sometimes, e.g. when the Finder is lagging, it is not displayed at all.

Besides that, the Finder doesn’t differentiate (GUI-wise) between Links and Aliases. I always check the Size column to see wether it’s an Alias or a link.

###Poll: Keep Here, or Start New Topic

Hey guys, which would you prefer, find most useful, regarding the posts about “LaunchBar”?

  1. Keep them in place here.
  2. Move all to a new topic.

(Note to self: this is an off-topic post about off-topics. Not good. . .)

I would prefer to have non-KM-stuff in its place, that is, in a Category (“Lounge”, Mac Chat”, or whatever).

Having a “dedicated” unspecific category has advantages;

  • People can post (sometimes valuable information, sometimes not), without having to take into account the topic (Of course, politics, porn, and similar stuff is not adequate.)

  • Topics in a “Generic Lounge” can always be linked to specific topics where they are relevant. Better this way than the other way round.

3 Likes

@Tom as @gglick states, this method works great. Snippets and abbreviations I create on one machine work on the other just fine.