luckman212 Posted May 31, 2021 Share Posted May 31, 2021 It does not seem possible to DISABLE quicklookurl for a script filter, either globally or for an individual JSON object/entry. I tried setting quicklookurl to null, as well as "" — but neither worked. Is this possible at all? Link to comment
Alan He Posted June 1, 2021 Share Posted June 1, 2021 (edited) 9 hours ago, luckman212 said: It does not seem possible to DISABLE quicklookurl for a script filter, either globally or for an individual JSON object/entry. I tried setting quicklookurl to null, as well as "" — but neither worked. Is this possible at all? Don't set quicklookurl. Edited June 1, 2021 by Alan He Link to comment
deanishe Posted June 1, 2021 Share Posted June 1, 2021 (edited) 48 minutes ago, Alan He said: Don't set quicklookurl That won't work. quicklookurl doesn't turn Quicklook on or off. It just specifies a value that Alfred should pass to Quicklook instead of arg. If arg is set to something previewable (filepath, URL), Quicklook will be active even if you didn't set quicklookurl. Edited June 1, 2021 by deanishe Link to comment
deanishe Posted June 1, 2021 Share Posted June 1, 2021 10 hours ago, luckman212 said: It does not seem possible to DISABLE quicklookurl for a script filter I believe the only way to do this is to make sure arg isn’t a filepath or URL (i.e. it’s not Quicklook-able). Link to comment
luckman212 Posted June 1, 2021 Author Share Posted June 1, 2021 Thanks @deanishe that's what I thought... Would be a nice feature to have. I guess the poor man's workaround is to pass your data via another variable and just set arg to null, eh? eg ... title: "no quicklook here!", arg: null, variables: { realarg: "x-man-page://ln" } Link to comment
vitor Posted June 1, 2021 Share Posted June 1, 2021 11 hours ago, luckman212 said: I guess the poor man's workaround is to pass your data via another variable and just set arg to null, eh? You don’t need arg: null, you can simply not set it. But I’m curious as to why you want to disable QuickLook. Can’t you just not press the shortcut? And if the problem is that you’re using x-man-page://—assuming all results have it—why not remove that part and add it to the (presumed) Open URL you have later on? Same result, no need for for variables and no QuickLook. That’s the issue with XY problems. There may be a solution that works for your case (like above) but we won’t know for sure unless you explain what the real problem is. deanishe 1 Link to comment
deanishe Posted June 1, 2021 Share Posted June 1, 2021 13 hours ago, luckman212 said: I guess the poor man's workaround is to pass your data via another variable and just set arg to null, eh? Not setting arg and quicklookurl will disable Quick Look for an item. I’m not sure that’s a good idea (you also lose support for the Buffer and File Actions if arg is a path), but I don’t really understand why you want to disable Quick Look to begin with. Link to comment
luckman212 Posted June 1, 2021 Author Share Posted June 1, 2021 (edited) 4 hours ago, vitor said: I’m curious as to why you want to disable QuickLook. Can’t you just not press the shortcut? I want to use <shift> in a mods: {...} section to toggle the subtitle to show some other data. The problem frequently manifests itself when tapping shift twice in a row too quickly. Quote And if the problem is that you’re using x-man-page://—assuming all results have it No, all results don't have x-man-page:// — they are all sorts of different things, URLs, file paths, strings of text, etc. Edited June 1, 2021 by luckman212 Link to comment
vitor Posted June 1, 2021 Share Posted June 1, 2021 1 hour ago, luckman212 said: I want to use <shift> in a mods: {...} section to toggle the subtitle to show some other data. The problem frequently manifests itself when tapping shift twice in a row too quickly. If you’re prone to pressing ⇧ in a way which invokes Quick Look when you just wanted the modifier: Alfred Preferences → Features → Previews → [untick] ⇧ to Quick Look selected item. ⌘Y will still work to show Quick Look, but ⇧ will stop doing it. Link to comment
Andrew Posted June 2, 2021 Share Posted June 2, 2021 Reading this, it seems like if the Script Filter quicklookurl param is specifically set to an empty string or null, Alfred should respect that as not wanting quicklook for this result. The absence of quicklookurl will still be treated as it is currently, and falls back to arg. Can anybody think of a reason this would be a bad idea, or cause regressions with their current Script Filters? Mr Pennyworth 1 Link to comment
deanishe Posted June 2, 2021 Share Posted June 2, 2021 (edited) 26 minutes ago, Andrew said: Can anybody think of a reason this would be a bad idea, or cause regressions with their current Script Filters? Hard to say, tbh. It won’t affect any workflows written with my libraries, as they only output fields that have been explicitly set. I could imagine that quite a few workflows output more complete item objects by default, though, as it doesn’t make a difference to most item fields if they're absent or empty. Edited June 2, 2021 by deanishe Link to comment
Andrew Posted June 2, 2021 Share Posted June 2, 2021 i'm going to make this change for the next release, and I'll update the documentation to mention using arg when quicklookurl is not set. If this causes a vast unexpected impact, I'll take a second look. deanishe and vitor 2 Link to comment
luckman212 Posted June 2, 2021 Author Share Posted June 2, 2021 Thanks @Andrew ! Sounds great. Link to comment
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