Jump to content

Is there any way for a workflow to know how many items Alfred shows?

Recommended Posts

Sometimes its not clear that there are more items available 'below Alfred's fold'.

For example, in this list it's not clear that there are actually more options to choose from:




So I thought I could get clever in a script filter and insert some helper text when there's too many entries


# Overflow check
if len(input_json["items"]) > 9:
    # Add "subtitle" to the last visible entry
    input_json["items"][8]["subtitle"] = "Scroll for more swatches…"




But this will only work as long as the user has chosen to show 9 items



So I'm wondering if there's any way to access this "I want to see" value? I have a feeling it's not possible, because if it were, it would be among the Workflow Script Environment Variables. But maybe there's another way to determine the total entries Alfred is showing?


Edited by Floating.Point
fixed some wording
Link to comment

It’s possible but it would be a hacky solution and you’d be fighting against user preference. Just like users can choose to show, hide, or conditionally show subtext, they can also choose to show, hide, or conditionally show the scroll bar, which is an indicator of more results. With your current settings, having the scroll bar show Automatically, you may indeed not know there are more results before going down, but if you change it to Always, you do know.

Link to comment

Ah yeah I don’t want to do anything hacky. I think I have always just incorrectly assumed ‘always’ mode would show a scroll bar even when there was nothing to scroll. Don’t I feel foolish now, learning this is not the case. Changing from ‘automatic’ mode to ‘always’ mode is all I needed to do. I assume this is Alfred’s default too and I must have just changed it years ago and never thought twice about it. Thanks for humouring me and as always being so gracious and helpful 😊

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