Floating.Point Posted November 11 Posted November 11 I have ran into a gotcha using Alfred on multiple machines. For demonstration, imagine a workflow with a filepath in the configuration: on Machine A this path is /run/current-system/sw/bin/ffmpeg on Machine B the path is /opt/homebrew/bin/ffmpeg I would like to be able to tell Alfred "Hey, don't sync this config" or "Hey, don't sync this field", and then I could set these to be unique across different environments.
vitor Posted November 11 Posted November 11 That could lead to some unexpected foot guns when sharing workflows. For your own workflows, it's best to be explicit in the code. You can e.g. check the name of the current user (${USER}) or the Mac’s name (/usr/sbin/scutil --get LocalHostName) then branch accordingly. Floating.Point 1
Floating.Point Posted November 11 Author Posted November 11 Ah yep localhostname will do the trick. Foot guns avoidance is very understandable here. Thanks Vitor!
Floating.Point Posted November 13 Author Posted November 13 (edited) For anyone who comes across this in the future, I solved this within my workflow like so: Script Action gets the current Mac's computer name: echo -n $(scutil --get ComputerName). Conditional Utility checks the result and branches into… Arg and Vars Utilities for each machine, which override the existing variables set in the workflow configuration panel. Edited November 13 by Floating.Point vitor 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now