Jump to content

All Activity

This stream auto-updates     

  1. Past hour
  2. @Andrew I came searching for a solution to the same problem (clipboard manipulation within a workflow resulting in duplicate/unwanted items). Is there any safer way in 2019 or with Alfred4 to do this now? Thank you
  3. @vitor Wow thank you for this guidance! I understand about the danger of unescaped vars now. Your workflow works great. I will study it and try to educate myself. Thanks for the tip about the heredoc too. I actually knew about those but for some reason I forget to use them.
  4. Alfred's built in search works as designed (less noise), so the behaviour you are seeing is correct. You have control over file search behaviour if you use a file filter in a workflow. For example, to arbitrarily search keywords, you would use something similar to this: You can add in other fields if you want to search by e.g. display name also. Here is more info on using file filters: https://www.alfredapp.com/help/workflows/inputs/file-filter/ Cheers, Andrew
  5. This is usually down to Alfred's preferences not being available when Alfred starts. Have you set Alfred's preferences to be in a different location to standard, for example an external volume or a mapped drive? Cheers, Andrew
  6. Today
  7. There is plenty wrong with Bash, but nothing wrong with you using it. It’s an idiosyncratic but capable glue language that I still use regularly. You can find it pretty much everywhere and be sure it will work with some consistency. But the way you’re writing it could indeed be improved upon. It makes little sense to keep escaping double quotes when you can use single quotes. Also, there’s no need for printf '%s\n' or so many of them. A single echo (or a Here Document) suffices. Your code isn’t working because Dynamic Placeholders aren‘t meant to be used in Alfred’s non-code areas. It wouldn’t be wise for Alfred to replace them everywhere and risk breaking your code. As a workaround, you may connect a Keyword Input to an Argument and Variables Utility that saves the clipboard contents as variables to be used in the Script Filter. Be aware that there is bound to be some breakage when the raw clipboard contents interact with the code, such as when you have a quotation mark in the clipboard. That is why raw Bash is not a good choice in this case — you need to sanitise your input beforehand, and libraries are good for that. Here’s a ready-made Workflow. I’ve kept and fixed the Bash example so you can still reference how your code could have been, but the end result uses Ruby. Finally I’ll ask that in the future, when asking for help with a Workflow, please upload it somewhere as it’s hard to help without access to it. Debugging can already be hard with access to the code, even harder to do so by guessing from a description. There are multiple places where the code or Workflow setup can be wrong. Without looking at it we’re mostly shooting in the dark. The Reporting Problems with Workflows topic gives a nice overview on how to build an effective report.
  8. Welcome @llanito, Further information will be required to diagnose your problem. Please read the following post on how to write an effective bug report.
  9. Useful workflow, thank you! I wonder is it by any means possible to get battery levels of connected devices?
  10. Alfred 4 is starting on boot but does not recognise the assigned hotkey until it is closed and started again.
  11. Yesterday
  12. Is it possible to Search the iTunes Music Store by Artist? It appears the only options are search by Album and Song, but would love to also search by Artist. Any help is much appreciated, thanks
  13. I'm trying to create a script filter that presents the last 3 items from the clipboard history and takes an action on them. E.g. {clipboard:0} {clipboard:1} {clipboard:2} etc. My language is bash for now (yes I know I should be using a real language, but this is just for POC) Here's what I have printf '%s\n' "<?xml version=\"1.0\"?>" printf '%s\n' "<output>" printf '%s\n' "<items>" printf '%s\n' "<item arg=\"{clipboard:0}\" valid=\"YES\">" printf '%s\n' "<title>{clipboard:0}</title>" printf '%s\n' "</item>" printf '%s\n' "<item arg=\"{clipboard:1}\" valid=\"YES\">" printf '%s\n' "<title>{clipboard:1}</title>" printf '%s\n' "</item>" printf '%s\n' "<item arg=\"{clipboard:2}\" valid=\"YES\">" printf '%s\n' "<title>{clipboard:2}</title>" printf '%s\n' "</item>" printf '%s\n' "</items>" printf '%s\n' "</output>" This does not work. It simply displays "{clipboard:0}" etc verbatim. Is there a way to access Alfred internal vars and special placeholders from within a Script Filter?
  14. macOS: 10.14.6 (18G87) Alfred: 4.0.3 b1092 I use `xattr -w com.apple.metadata:kMDItemKeywords` to add keywords to certain apps/files/folders to make searching easier. This works, but it seems Alfred has trouble when there are multiple keywords assigned. Take the example below, where I have tagged the "BackupLoupe" app with some keywords: The keywords are timemachine, machine and time. Specifying any SINGLE keyword works, e.g. Even this works, strangely (separating keywords by comma, space): But not this (space only): Or this (comma only) In "regular Spotlight" it works fine: I think this is a bug in how Alfred processes multiple keyword metadata.
  15. Alfred fully relies on standard Apple APIs to obtain the key code / key mappings which are used when simulating key combinations. I've added a ticket to look into this more deeply, but I can't promise any timescales as this is the first time it's come up and it has to be treated as a corner case. Cheers, Andrew
  16. An underlying library that polyglot uses to install itself doesn't support Alfred 4, will have to wait for a fix: https://github.com/SamVerschueren/alfred-link/issues/23
  17. Last week
  18. 1Password integration with what? Alfred's 1Password integration, or Chrome's 1Password integration?
  19. That sounds about right. Alfred uses keycodes under the hood (at least for user-set Hotkeys, so likely also for its own), and keycodes map to physical keys, not the letters on them. Presumably, this is very common behaviour, and Apple's own keyboard layouts have extra smarts for dealing with this situation.
  20. Looks like a cool workflow I did the `npm install` and it seemed to run fine -- no error messages, anyway. But -- the workflow is not installed. If I go to Alfred Preferences, it's not in my list of workflows. Any thoughts?
  21. This executes sudo killall VDCAssistant && sudo killall AppleCameraAssistant To reset your mac's webcam after hopping between displays and external cameras V1.0: https://www.dropbox.com/s/vi23vp93zzckdwn/Reset Mac Webcam.alfredworkflow?dl=0
  22. The conclusion from two weeks of using several custom keyboard layouts extensively: Alfred is not compatible with copying. I need to switch to one of the layouts provided by Apple to do anything that involves Alfred. It seems that is the problem is that Alfred tries to use ⌘c shortcut while copying, but uses instead the qwerty letter that originally lies in the place where C is in the given layout. Here is how i figured it out. Things that not work with with custom layouts are snippets, while snippet menu and clipboard menus copy to clipboard instead of pasting to the frontmost app. Nothing interesting here. What seems crucial is that keyboard shortcut that involve text selection behave strangely. With customised Dvorak: a) in apps that support any action involving ⌘i, they perform that action (most often italicising the word selected) and then they open Alfred window. But instead of seeing a prefix (from the workflow) and the previously selected word, see only the prefix. This happens independent of the original keyboard shortcut for the workflow. b) in an app that does not support any ⌘i shortcuts, these workflows act as expected In Dvorak the letter "i" is at the place of qwerty's "g", and in place of qwerty's "i" we have "c". So my idea is that instead of ⌘c, Alfred sends ⌘i. To confirm this, I tried bépo. Here "c" is at the place of qwerty's "h". And indeed when I try mapped a random action in my browser to ⌘h and tried to used a keyboard shortcut with text selection with bépo, this action was performed (and Alfred window opened with the prefix but no text). I'd gladly help with any logs that you'd need and do anything you need in order to help you resolve this. PS Naturally I tried forcing Alfred in the settings to always use one of the standards layout, but it didn't help.
  23. +1 Also, right now Alfred only offers 2 options for opening these links: in macOS default browser in bookmark's source browser For opening in private windows or for when you have many Chrome profiles these two options aren' ideal. If you could add an option to open in: last selected browser window This would be a game changer 🤞 This is currently how 1Password integration works and it's super nice. I always get confused when Alfred Bookmarks behaves differently.
  24. I was away for a few days, but I’m looking at this again. That’s on purpose and won’t be changed any time soon. There’s a discrepancy between what youtube-dl reports it will download and what it really does given best. I’ve decided on downloading “the best mp4” because in my tests it was a more common format and more useful on macOS (can be previewed with QuickLook). audio_format only affects audio-only downloads. That’s a good point. For everyone with an issue, do you have custom download_dir or watchlist_download_dir values (Workfow Environment Variables)? What are they? If you delete them, does the issue go away? Paths should be absolute or use ~ to represent the home directory (e.g. ~/Downloads). It may be worth to delete and redownload the Workflow but tell Alfred to not import the previous settings. DownVid won’t auto-update without telling you, but the underlying youtube-dl might. After this post, who still has an issue?
  25. The one I linked previously. When you add an External Trigger, Alfred shows you the sample AppleScript code you need to invoke. How you call the AppleScript is up to you. If you were doing it in a Terminal, you’d do something like osascript -e 'CODE HERE'.
  26. Thanks, is there a doc somewhere you know of that shows how to do that?
  27. I should’ve been clearer — there’s no URL scheme you can use, the only way to do it is via AppleScript.
  1. Load more activity
  • Create New...