New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Legacy LaunchBar Scripts and New LaunchBar Actions #4

Closed
Zettt opened this Issue Jul 20, 2014 · 9 comments

Comments

Projects
None yet
4 participants
@Zettt
Owner

Zettt commented Jul 20, 2014

I'm having a hard time to decide what to do with legacy LaunchBar scripts, which still work, and coming up with a new convention for the newer LaunchBar Actions format, which has some neat advantages.

My main goal with the changes I have in mind:

  • A user that is not so familiar with Git, and only a little versed with Terminal should be able to check out the repository and get most of the stuff up and running in a short(er) period of time.
  • Advanced users should be able to check out the repo and commit changes (to send pull requests).
  • Ideally transitioning to LaunchBar Actions would be easier for me.
  • The folder structure should make sense and shouldn't be such a mess as it is at the moment. Right now, when a user checks out this repo and has no idea what he/she is doing, they end up with all scripts in _Archive (which are not functioning) activated by default.
  • The entire folder hierarchy needs to be changed to accommodate for clearer and more precise usage. This repo started fully as a full LaunchBar-only repo, then Alfred appeared and I started tinkering with Keyboard Maestro. So a lot of scripts from that time were optimized to work in all three. With the introduction of LaunchBar Actions, and this repo being named "LaunchBar Scripts", it makes sense to think about either a name change "App Launcher Scripts", or a full focus back on LaunchBar.

My least favorite is, frankly, a full focus on LaunchBar. I know LaunchBar is great and we all love, but so do a lot of Alfred users love Alfred. I wouldn't say Keyboard Maestro is that bad either. (If you read my blog, you know that's quite an understatement.) So I'm left with a difficult problem:

This repo needs serious restructuring!

I thought something like different folders for the scripts would make sense. Something like this:

_Archive
LaunchBar Actions
LaunchBar Scripts
Alfred Extensions
Alfred Scripts
Keyboard Maestro Macros
Keyboard Maestro Scripts

A user could check out this repository to say ~/Coding/App Launcher Scripts/ and then symlink only the folders they need to ~/Library/Application Support/LaunchBar/Actions.
Only preferred scripts would be activated by default. Only some scripts would require manual deactivation in the LaunchBar index. I'm not certain, but thought Alfred had something similar.

The only problem then is where or rather how do I keep a script that runs in either launcher? Would a copy not make maintenance more difficult?

@Zettt

This comment has been minimized.

Show comment
Hide comment
@Zettt

Zettt Jul 20, 2014

Owner

I also just realized that LaunchBar wants to install new actions, i.e. copy to Actions directory. I don't think it's possible to symlink the actions, so that users just pull their repo and have their actions updated automatically.

Owner

Zettt commented Jul 20, 2014

I also just realized that LaunchBar wants to install new actions, i.e. copy to Actions directory. I don't think it's possible to symlink the actions, so that users just pull their repo and have their actions updated automatically.

@prenagha

This comment has been minimized.

Show comment
Hide comment
@prenagha

prenagha Jul 21, 2014

i use soft links from Actions/ dir to a git checkout dir routinely while building custom actions
they work fine

prenagha commented Jul 21, 2014

i use soft links from Actions/ dir to a git checkout dir routinely while building custom actions
they work fine

@MacLemon

This comment has been minimized.

Show comment
Hide comment
@MacLemon

MacLemon Jul 21, 2014

Symlinks work just fine.

MacLemon commented Jul 21, 2014

Symlinks work just fine.

@marcomasser

This comment has been minimized.

Show comment
Hide comment
@marcomasser

marcomasser Jul 21, 2014

I also just realized that LaunchBar wants to install new actions, i.e. copy to Actions directory. I don't think it's possible to symlink the actions, so that users just pull their repo and have the new actions installed automatically.

Currently, when opening a .lbaction bundle, LaunchBar simply checks if that .lbaction bundle is inside the ~/Library/Application Support/LaunchBar/Actions directory. If not, it shows the install dialog. (Otherwise, it tries to select the indexed action.)

It should therefore be no problem to do some symlinking.

marcomasser commented Jul 21, 2014

I also just realized that LaunchBar wants to install new actions, i.e. copy to Actions directory. I don't think it's possible to symlink the actions, so that users just pull their repo and have the new actions installed automatically.

Currently, when opening a .lbaction bundle, LaunchBar simply checks if that .lbaction bundle is inside the ~/Library/Application Support/LaunchBar/Actions directory. If not, it shows the install dialog. (Otherwise, it tries to select the indexed action.)

It should therefore be no problem to do some symlinking.

@Zettt

This comment has been minimized.

Show comment
Hide comment
@Zettt

Zettt Jul 21, 2014

Owner

@marcomasser Are you certain? I've tried this yesterday and LaunchBar didn't seem to recognize the .lbactions. I had them in ~/Coding in a folder and symlinked the folder itself to /Actions.

Owner

Zettt commented Jul 21, 2014

@marcomasser Are you certain? I've tried this yesterday and LaunchBar didn't seem to recognize the .lbactions. I had them in ~/Coding in a folder and symlinked the folder itself to /Actions.

@prenagha

This comment has been minimized.

Show comment
Hide comment
@prenagha

prenagha Jul 21, 2014

I know that symlinking individual actions works fine, not sure if directory linking works
ln -s ~/Dev/lb/foo.lbaction ~/Library/Application Support/LaunchBar/Actions/foo.lbaction

prenagha commented Jul 21, 2014

I know that symlinking individual actions works fine, not sure if directory linking works
ln -s ~/Dev/lb/foo.lbaction ~/Library/Application Support/LaunchBar/Actions/foo.lbaction

@marcomasser

This comment has been minimized.

Show comment
Hide comment
@marcomasser

marcomasser Jul 22, 2014

@marcomasser Are you certain? I've tried this yesterday and LaunchBar didn't seem to recognize the .lbactions. I had them in ~/Coding in a folder and symlinked the folder itself to /Actions.

Is ~/Library/Application Support/LaunchBar/Actions a symlink? Or did you put a symlink inside that directory that points to a directory with your .lbactions? The former should be fine, but I think the latter won't work at the moment because IIRC, LaunchBar doesn't index the Actions directory recursively.

I can't verify all of that right now because I'm not in the office this week.

marcomasser commented Jul 22, 2014

@marcomasser Are you certain? I've tried this yesterday and LaunchBar didn't seem to recognize the .lbactions. I had them in ~/Coding in a folder and symlinked the folder itself to /Actions.

Is ~/Library/Application Support/LaunchBar/Actions a symlink? Or did you put a symlink inside that directory that points to a directory with your .lbactions? The former should be fine, but I think the latter won't work at the moment because IIRC, LaunchBar doesn't index the Actions directory recursively.

I can't verify all of that right now because I'm not in the office this week.

@Zettt

This comment has been minimized.

Show comment
Hide comment
@Zettt

Zettt Jul 24, 2014

Owner

@marcomasser No, the Actions directory itself is not a symlink. It contains folders that I would link directly under Actions. See the upper explanation in my initial post.

I think that's the best option actually. If someone likes to have the .lbactions, they can symlink the LaunchBar Actions directory. If they additionally want the LaunchBar Scripts directory they can symlink that additionally.
LaunchBar indexes all actions automatically and even a not-so-advanced user can disable individual actions from within LaunchBar.

Owner

Zettt commented Jul 24, 2014

@marcomasser No, the Actions directory itself is not a symlink. It contains folders that I would link directly under Actions. See the upper explanation in my initial post.

I think that's the best option actually. If someone likes to have the .lbactions, they can symlink the LaunchBar Actions directory. If they additionally want the LaunchBar Scripts directory they can symlink that additionally.
LaunchBar indexes all actions automatically and even a not-so-advanced user can disable individual actions from within LaunchBar.

This was referenced Jul 26, 2014

@Zettt

This comment has been minimized.

Show comment
Hide comment
@Zettt

Zettt Aug 2, 2014

Owner

I, mistakenly, deleted my last comment. I was able to recover it from @marcomasser's emails. Here it is.

OK. I made a decision. This repo is going to have subfolders, as mentioned in my original post.

Here's how it's going to work

There are going to be subfolders for each category. They are:

_Archive
General Scripts
LaunchBar Actions
LaunchBar Scripts
Keyboard Maestro Macros
Keyboard Maestro Scripts
Alfred Extensions
Alfred Scripts

Users will have to symlink either directories or actions by hand. I'll add descriptions to the readme later.

I saw that I have a General Use folder in my Zettt/km-macros repo. This means I can merge the two repos into one.
I made some commits today to prepare for this change. Lots of code improvements, modernizations, more documentation here and there. I'll push the "big" changes later when I feel comfortable.
For now the Alfred folders remain empty. I don't use Alfred on my machine, and at the moment can't see me having enough time to get into Alfred development too. Keyboard Maestro and LaunchBar are my main focus, though I welcome any contributions.
Thanks for your suggestions, @everyone!

Owner

Zettt commented Aug 2, 2014

I, mistakenly, deleted my last comment. I was able to recover it from @marcomasser's emails. Here it is.

OK. I made a decision. This repo is going to have subfolders, as mentioned in my original post.

Here's how it's going to work

There are going to be subfolders for each category. They are:

_Archive
General Scripts
LaunchBar Actions
LaunchBar Scripts
Keyboard Maestro Macros
Keyboard Maestro Scripts
Alfred Extensions
Alfred Scripts

Users will have to symlink either directories or actions by hand. I'll add descriptions to the readme later.

I saw that I have a General Use folder in my Zettt/km-macros repo. This means I can merge the two repos into one.
I made some commits today to prepare for this change. Lots of code improvements, modernizations, more documentation here and there. I'll push the "big" changes later when I feel comfortable.
For now the Alfred folders remain empty. I don't use Alfred on my machine, and at the moment can't see me having enough time to get into Alfred development too. Keyboard Maestro and LaunchBar are my main focus, though I welcome any contributions.
Thanks for your suggestions, @everyone!

@Zettt Zettt closed this Aug 2, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment