XDo::Search
Represents an XDo search query.
Queries can contain multiple conditions (such as matching both a window name and a process ID), as well as impose restrictions on the number of results returned, search depth, and extent of search (e.g., limiting the search to a single screen).
See XDo#search(query) for an example of using Search objects.
Constructors
Class methods
Builds a Search instance via a DSL.
# find no more than 3 windows that are both visible AND have the name "Firefox"
Search.build do
require_all
only_visible
window_name "Firefox"
limit 3
end
Instance methods
Limit the number of results returned. By default, no limit (0) is imposed.
Limit search to a depth of depth.
0 guarantees an empty search, 1 limits the search to toplevel windows only.
By default, no limit (-1) is imposed.
Require all criteria to be met, not just one.
This is equivalent to requiring the AND of all conditions, rather than the
OR (which is the default).
Converts the instance into a struct compatible with libxdo.
NOTE: You should never have to interact with this method directly.