-
Posts
8,759 -
Joined
-
Last visited
-
Days Won
522
Content Type
Blogs
Gallery
Downloads
Events
Profiles
Forums
Articles
Media Demo
Everything posted by deanishe
-
No, it will be the name of the binary that’s running. The name might be similar to the workflow's if it runs a binary (you'll see "alfred-firefox" for my Firefox workflow, for example), but most workflows are built with scripting languages, in which case you see the name of the interpreter (e.g. "bash", "Python", "zsh"). Normally, it's not possible to figure out which workflow a process belongs to without inspecting it to see which files are open.
-
That's probably how I would do it if I wanted all URLs to open in a new Chrome window, yes. It's also possible that an app like Choosy or OpenIn (which are designed for people with bespoke URL-opening requirements) has the feature built in. Here's a simple application that opens URLs in a new Chrome window. I used Platypus to turn the following AppleScript into an app with HTTP handlers. on run argv tell application "Google Chrome" repeat with _url in argv make new window set URL of active tab of window 1 to _url end repeat end tell end run
-
Hi @blgentry, welcome to the forum. There are multiple ways to do it. What people mean is that the standard on macOS is that it's up to the target application how documents or URLs are opened. It's Chrome's job to provide an "open links in tabs/windows" option, the way Safari and Firefox do (or to obey the "Prefer tabs when opening documents" setting in System Preferences > Dock). In particular, the standard macOS APIs for opening stuff, which every well-behaved Mac app is expected to use, don't allow you to tell the target app how to open something, so getting Chrome to do it would essentially require a parallel implementation of all the parts of Alfred that launch URLs just for Chrome. That’s a hell of a request to work around a lacking Chrome feature, especially when it can be achieved in a few minutes with a shim application that translates standard macOS open location messages into “open in a new Chrome window” commands.
-
Creating nested navigation trees with List Filters
deanishe replied to Chris Messina's topic in Workflow Help & Questions
Not off the top of my head. It's generally best to avoid a deep hierarchy because Alfred doesn't really work that way. It likes flat lists, not trees. My Safari workflow lets you navigate your bookmark hierarchy. The key thing is that it flattens the tree. There's a single Script Filter for bookmarks that can list a single folder's contents and call itself on subfolders. Sure. Using tools you understand well is inherently easier than using ones you don't. But at some point, the tool you don't understand is so much better suited to a job, turning your nose up at it becomes a bit questionable. I really don't understand your aversion to coding. As far as I can tell, you're all about automation and productivity apps, but you draw the line at the most powerful automation tools of all? -
snippets with {date:YYYY} show 2022 instead of 2021
deanishe replied to octothorpe's topic in Discussion & Help
It shouldn't: the appropriate standard also starts the week on Monday. AFAIK, starting the week on a Sunday is another one of those bizarre Americanisms. Other people don't do it that way. -
snippets with {date:YYYY} show 2022 instead of 2021
deanishe replied to octothorpe's topic in Discussion & Help
Kinda. YYYY should also be 2021 until Monday, and it is on my machine. -
In Python 3: from datetime import datetime, timedelta # date to find week for in format YYYY-MM-DD input_date = '2022-01-06' dt = datetime.strptime(input_date, '%Y-%m-%d') while dt.weekday(): # 0 = Monday dt -= timedelta(days=1) formatted = 'week of ' + dt.strftime('%d %B').lstrip('0') print(f'{input_date} -> week of {formatted}')
-
I think there's only "week of year". If you want to find the first day of that week, you'll need to do that programmatically by the looks of it. It probably wouldn't work for you, anyway, because ISO weeks start on a Monday, so next week would be "week of 3 January", not 2.
-
Hi @chrischurch911, welcome to the forum. Alfred is a launcher. It’s concerned with (finding and) running things. It’s a great way to trigger your workflow when your email app or browser is open, but it can’t help you make any of the applications do any of those things you want them to do. Indeed, based on your description, I don't think any automation app could help much. I'd say there's no way around writing code (some AppleScript, something else for text processing). Nobody can give you a concrete answer, though, without knowing at least which specific applications you're talking about. Better yet, describe your problem in terms of inputs and outputs, not the actions you perform. Software is hopeless at using the user interface. Trying to emulate user interaction might work, but it will definitely be crap.
-
Creating nested navigation trees with List Filters
deanishe replied to Chris Messina's topic in Workflow Help & Questions
That’s what Script Filters are for. If you want to use a static JSON file, just use cat file.json as the Script. Seems likely. Perhaps a bug? Instead of having a "Clears value of {query} …" Arg & Vars on every branch out of the Conditional, you could put just one before it to clear arg and set a variable from {query}, then switch on the variable in the Conditional. More generally, moving more of the workflow into scripts. It's significantly easier to manage complexity in code. You could replace the Conditional and its List Filters with a single script. That really pays dividends when you decide you want to change something. -
Personally, I would either use one of the SQL scripts on the forum that alters the dates in Alfred's clipboard history database so nothing ever expires, or export the old entries to a separate SQLite database and search that with a workflow. Keeping the data forever is absolutely fine as long as you don't go nuts. I just don't see it being an official feature because it would cause support requests.
-
Oh no, what you said is 100% correct. But Germans love Week of Year for some reason, so it's printed on every calendar, and this week is 100% week 52 of 2021, not week 1 of 2022. YYYY should be 2021 before Monday 3 January. I just ran the same snippet placeholder ({date:YYYY-MM-dd}) on my machine, and I get 2021-12-30. So something funny is going on with @vfade's Mac all the same. What do you get on your machine, @Andrew? @vfade Could you check your OS date & time settings? If everything's okay, what locale/region settings do you have?