docs » FadeLogo

Show a fading-and-zooming image in the center of the screen

By default the Hammerspoon logo is shown. Typical use is to show it as an indicator when your configuration finishes loading, by adding the following to the bottom of your ~/.hammerspoon/init.lua file:

  hs.loadSpoon('FadeLogo'):start()

Which looks like this: http://imgur.com/a/TbZOl

Download: https://github.com/Hammerspoon/Spoons/raw/master/Spoons/FadeLogo.spoon.zip

API Overview

API Documentation

Variables

fade_in_time
Signature FadeLogo.fade_in_time
Type Variable
Description Number of seconds over which to fade in the image. Defaults to 0.3.
Source Source/FadeLogo.spoon/init.lua line 48
fade_out_time
Signature FadeLogo.fade_out_time
Type Variable
Description Number of seconds over which to fade out the image. Defaults to 0.5.
Source Source/FadeLogo.spoon/init.lua line 53
image
Signature FadeLogo.image
Type Variable
Description Image to display. Must be an `hs.image` object. Defaults to `hs.image.imageFromName(hs.image.systemImageNames.ApplicationIcon)` (the Hammerspoon app icon)
Source Source/FadeLogo.spoon/init.lua line 28
image_alpha
Signature FadeLogo.image_alpha
Type Variable
Description Initial transparency of the image. Defaults to 1.0.
Source Source/FadeLogo.spoon/init.lua line 38
image_size
Signature FadeLogo.image_size
Type Variable
Description `hs.geometry` object specifying the initial size of the image to display in the center of the screen. The image object will be resizes proportionally to fit in this size. Defaults to `hs.geometry.size(w=200, h=200)`
Source Source/FadeLogo.spoon/init.lua line 33
logger
Signature FadeLogo.logger
Type Variable
Description Logger object used within the Spoon. Can be accessed to set the default log level for the messages coming from the Spoon.
Source Source/FadeLogo.spoon/init.lua line 23
run_time
Signature FadeLogo.run_time
Type Variable
Description Number of seconds to leave the image on the screen when `start()` is called.
Source Source/FadeLogo.spoon/init.lua line 58
zoom
Signature FadeLogo.zoom
Type Variable
Description Do zoom-and-fade if `true`, otherwise do a regular fade
Source Source/FadeLogo.spoon/init.lua line 43
zoom_scale_factor
Signature FadeLogo.zoom_scale_factor
Type Variable
Description Factor by which to scale the image at every iteration during the zoom-and-fade. Defaults to 1.1.
Source Source/FadeLogo.spoon/init.lua line 63
zoom_scale_timer
Signature FadeLogo.zoom_scale_timer
Type Variable
Description Seconds between the zooming iterations
Source Source/FadeLogo.spoon/init.lua line 68

Methods

delete
Signature FadeLogo:delete()
Type Method
Description Hide and delete the canvas
Parameters
  • None
Returns
Source Source/FadeLogo.spoon/init.lua line 78
hide
Signature FadeLogo:hide()
Type Method
Description Hide the image without zoom, fading it out over `fade_out_time` seconds
Parameters
  • None
Returns
Source Source/FadeLogo.spoon/init.lua line 115
show
Signature FadeLogo:show()
Type Method
Description Display the image, fading it in over `fade_in_time` seconds
Parameters
  • None
Returns
Source Source/FadeLogo.spoon/init.lua line 90
start
Signature FadeLogo:start()
Type Method
Description Show the image, wait `run_time` seconds, and then zoom-and-fade it out.
Parameters
  • None
Returns
Source Source/FadeLogo.spoon/init.lua line 151
zoom_and_fade
Signature FadeLogo:zoom_and_fade()
Type Method
Description Zoom-and-fade the image over `fade_out_time` seconds
Parameters
  • None
Returns
Source Source/FadeLogo.spoon/init.lua line 125