![]() ![]() This setting is persistent across reloading and restarting Hammerspoon.state - an optional boolean specifying whether or not Spotlight should be used to try and determine alternate application names for hs.application.find and similar functions.Get or set whether Spotlight should be used to find alternate names for applications. Hs.application.enableSpotlightForNameSearches() -> boolean A string containing a bundle ID, or nil if none could be foundĮxtensions/application/libapplication.m line 215.Returns the bundle ID of the default application for a given UTI A table of zero or more hs.application objects that match the given identifierĮxtensions/application/libapplication.m line 71.bundleID - An OSX application bundle identifier.Returns any running apps that have the given bundleID. Hs.application.applicationsForBundleID(bundleID) -> list of hs.application objects An hs.application object if one can be found, otherwise nilĮxtensions/application/libapplication.m line 54.Returns the running app for the given pid, if it exists. Hs.application.applicationForPID(pid) -> hs.application object or nil kMenuAppleLogoOutlineGlyph, 0圆C, Apple logo key (outline)Įxtensions/application/a line 239.kMenuTrademarkJapaneseGlyph, 0x1F, Unassigned (trademark in Japanese).kMenuParagraphKoreanGlyph, 0x15, Unassigned (paragraph in Korean).kMenuNonmarkingReturnGlyph, 0x0D, Nonmarking return key.kMenuNullGlyph, 0x00, Null (always glyph 1).If you believe that you know of a (preferably sanctioned by Apple) proper visual representation, please submit an issue detailing it at the Hammerspoon repository on GitHub. The following constants are defined in Menus.h, but do not seem to correspond to a visible UTF8 character or well defined representation that I could discover. ![]() The glyphs provided are defined in the Carbon framework headers in the Menus.h file, located (as of 10.11) at /System/Library/Frameworks/amework/Frameworks/amework/Headers/Menus.h. This table is provided as a variable so that you can change any representation if you feel you know of a better or more appropriate one for you usage at runtime. Methods - API calls which can only be made on an object returned by a constructorĪPI Documentation Variables menuGlyphs SignatureĪ table containing UTF8 representations of the defined key glyphs used in Menus for keyboard shortcuts which are presented pictorially rather than as text (arrow keys, return key, etc.)Ī _tostring metamethod is provided for this table so you can view its current contents by typing hs.nuGlyphs into the Hammerspoon console.Constructors - API calls which return an object, typically one that offers API methods.Functions - API calls offered directly by the extension.Manipulate running applications Submodules watcher.new ( applicationWatcher ): start () - 输入法切换提示 - hs.keycodes.inputSourceChanged(function() - if hs.keycodes.currentMethod() = nil then - hs.alert.show("ABC", hs.faultStyle, hs.screen.mainScreen(), 2) - else - hs.alert.show("拼音", hs.faultStyle, hs.screen.Hammerspoon docs: hs.application docs » hs.application currentSourceID () end end end end appWatcher = hs.application. currentSourceID ( currentID ) currentID = hs.keycodes. activated then for app, fn in pairs ( appInputMethod ) do if app = appName then hs.keycodes. currentSourceID () fn () end end end if eventType = hs.application. watcher.activated ) then for app, fn in pairs ( appInputMethod ) do if app = appName then currentID = hs.keycodes. bind ( - activated 时切换到指定的输入法,deactivated 时恢复之前的状态 currentID = "" function applicationWatcher ( appName, eventType, appObject ) if ( eventType = hs.application. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |