Update README.md

This commit is contained in:
edluffy 2021-03-17 18:12:48 +00:00 committed by GitHub
parent 5a6c375b80
commit dbc7fa571b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -18,12 +18,31 @@ require('specs').setup{
show_jumps = true, show_jumps = true,
min_jump = 30, min_jump = 30,
popup = { popup = {
delay_ms = 0, delay_ms = 0, -- delay before popup displays
inc_ms = 10, inc_ms = 10, -- time increments used for fade/resize effects
blend = 10, blend = 10, -- starting blend, between 0-100 (fully transparent), see :h winblend
width = 10, width = 10,
fader = require('specs').linear_fader, fader = require('specs').linear_fader,
resizer = require('specs').shrink_resizer resizer = require('specs').shrink_resizer
} }
} }
``` ```
You can implement your own custom fader/resizer functions for some pretty cool effects:
```lua
require('specs').setup{
popup = {
-- Simple constant blend effect
fader = function(blend, cnt)
if cnt > 100 then
return 80
else return nil end
end,
-- Growing effect from left to right
resizer = function(width, ccol, cnt)
if width-cnt > 0 then
return {width+cnt, ccol}
else return nil end
end,
}
}
```