Skip to content

hs.window.filter startup times #3723

@r2evans

Description

@r2evans

I'm adapting the AppWindowSwitcher spoon for some personal use-cases (i.e., windows without bundle-ids), and one tactic I'm doing is recording the creation/deletion of windows. However, this line takes around 10-15 seconds:

    hs.window.filter.new(true):subscribe(
        { hs.window.filter.windowCreated, hs.window.filter.windowDestroyed },
        myfun, true)

Is there a way to speed up this instantiation? I don't think coroutines are feasible, at least not from my user-code, since this is a single call where I cannot add/control things like yield.

Admitteldy I'm new to lua (not programming), so if I'm missing something obvious, my apologies. Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions