#hs.hints

Switch focus with a transient per-application keyboard shortcut


#API Overview

Variables - Configurable values

Functions - API calls offered directly by the extension


#API Documentation

#Variables

Signaturehs.hints.fontName
TypeVariable
DescriptionA fully specified family-face name, preferably the PostScript name, such as Helvetica-BoldOblique or Times-Roman. (The Font Book app displays PostScript names of fonts in the Font Info panel.)
NotesNone
Sourceextensions/hints/hints.lua line 25

Signaturehs.hints.fontSize
TypeVariable
DescriptionThe size of font that should be used. A value of 0.0 will use the default size.
NotesNone
Sourceextensions/hints/hints.lua line 31

Signaturehs.hints.hintChars
TypeVariable
DescriptionThis controls the set of characters that will be used for window hints. They must be characters found in hs.keycodes.map
NotesNone
Sourceextensions/hints/hints.lua line 10

Signaturehs.hints.iconAlpha
TypeVariable
DescriptionOpacity of the application icon. Default is 0.95.
NotesNone
Sourceextensions/hints/hints.lua line 47

Signaturehs.hints.showTitleThresh
TypeVariable
DescriptionIf there are less than or equal to this many windows on screen their titles will be shown in the hints.
NotesNone
Sourceextensions/hints/hints.lua line 36

Signaturehs.hints.style
TypeVariable
DescriptionIf this is set to "vimperator", every window hint starts with the first character
NotesNone
Sourceextensions/hints/hints.lua line 19

Signaturehs.hints.titleMaxSize
TypeVariable
DescriptionIf the title is longer than maxSize, the string is truncated, -1 to disable, valid value is >= 6
NotesNone
Sourceextensions/hints/hints.lua line 42

#Functions

Signaturehs.hints.windowHints([windows, callback, allowNonStandard])
TypeFunction
DescriptionDisplays a keyboard hint for switching focus to each window
Parameters
  • windows - An optional table containing some hs.window objects. If this value is nil, all windows will be hinted
  • callback - An optional function that will be called when a window has been selected by the user. The function will be called with a single argument containing the hs.window object of the window chosen by the user
  • allowNonStandard - An optional boolean. If true, all windows will be included, not just standard windows
Returns
  • None
Notes
  • If there are more windows open than there are characters available in hs.hints.hintChars, multiple characters will be used
  • If hints.style is set to "vimperator", every window hint is prefixed with the first character of the parent application's name
  • To display hints only for the currently focused application, try something like:
  • hs.hints.windowHints(hs.window.focusedWindow():application():allWindows())
ExamplesNone
Sourceextensions/hints/hints.lua line 201