Jump to content

Disable quicklook for Script Filter object


Recommended Posts

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
Posted (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.

 

 

 

image.thumb.png.ab8dd112904aebd7022f9d76de35e149.png

 

 

image.thumb.png.bc975eb6a5f518ee4af1d3eb0100960c.png

Edited by Alan He
Link to comment
Posted (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 by deanishe
Link to comment
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

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
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.

Link to comment
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
Posted (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 by luckman212
Link to comment
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

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?

Link to comment
Posted (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 by deanishe
Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...