![]() You should interact with it only via documented API that the plugins expose.In this book you will learn how to use Hammerspoon, a powerful open-source framework which makes using a Mac more pleasant, productive and fun. This is a table containing all of the loaded plugins for Seal. ![]() This isn't really shown, but it's necessary to force to render If string.match(command, query) and #query_words = 0 thenĬhoice = cmdInfoįunction obj.quer圜hangedCallback( query) TODO: This only makes sense to do if we can select the choice without dismissing the chooser, which requires changes to HSChooser Query_words = ncat(query_words, " ")įor command,cmdInfo in pairs(obj. If tostring(query): find( "^%s*$ ") ~= nil thenįor word in string.gmatch(query, "%S+ ") do TODO: Sort each of these clusters of choices, alphabetically chooser: query(query) endįunction obj.completionCallback( rowInfo) * This may be useful if you wish to show Seal in response to something other than its hotkey * query - An optional string to pre-populate the query box with * Some Seal plugins will continue performing background work even after this call (e.g. new(toggleMods, toggleKey, function() self: toggle() end) new(showMods, showKey, function() self: show() end) * toggle - This will cause Seal's UI to be shown or hidden depending on its current state * show - This will cause Seal's UI to be shown * mapping - A table containing hotkey modifier/key details for the following (optional) items: showError( string.format( "Error: could not find Seal plugin %s in any of the load paths %s ", plugin_name, hs. Loaded = ( self: loadPluginFromFile(plugin_name, file) ~= nil) * The plugin names in the list, should not have `seal_` at the start, or `.lua` at the end * The plugins live inside the Seal.spoon directory * plugins - A list containing the names of plugins to load Self: refreshCommandsForPlugin(plugin_name) Spotlight searches)įunction obj:loadPluginFromFile( plugin_name, file) ![]() * Some plugins may immediately begin doing background work (e.g. from non-standard locations and is mostly a development interface. * You should normally use `Seal:loadPlugins()`. * The Seal object if the plugin was successfully loaded, `nil` otherwise * file - the file where the plugin code is stored. * plugin_name - the name of the plugin, without "seal_" at the beginning or ".lua" at the end Seal:loadPluginFromFile(plugin_name, file) Refresh the list of commands provided by all the currently loaded plugins. depending on configuration) list of commands.įunction obj:refreshCommandsForPlugin( plugin_name)įor cmd,cmdInfo in pairs(plugin: commands()) do This method is used for plugins which expose a dynamic or changing (e.g. * Most Seal plugins expose a static list of commands (if any), which are registered at the time the plugin is loaded. Should be the name as passed to `loadPlugins()` or `loadPluginFromFile`. * plugin_name - the name of the plugin. ![]() Refresh the list of commands provided by the given plugin. Seal:refreshCommandsForPlugin(plugin_name) Defaults to `~/.hammerspoon/seal_plugins/` and the Seal Spoon directory. List of directories where Seal will look for plugins. Time between the last keystroke and the start of the recalculation of the choices to display, in seconds. * vpn : Connect and disconnect VPNs (currently supports Viscosity and macOS system preferences)A * useractions : User defined custom actions * urlformats : User defined URL formats to open * screencapture : Lets you take screenshots in various ways * safari_bookmarks : Open Safari bookmarks (this is broken since at least High Sierra) * rot13 : Apply ROT13 substitution cipher Seal includes a number of plugins, which you can choose to load (see `:loadPlugins()` below): ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |