goolord / alpha-nvim

a lua powered greeter like vim-startify / dashboard-nvim
MIT License
1.78k stars 104 forks source link

feat: allow terminal cmd to be a function #185

Closed bennypowers closed 1 year ago

bennypowers commented 1 year ago

Similarly to how val can be a function, this lets users define a function that returns the terminal command.

Why? Users might want to do expensive FS tasks in order to, say, get a random script and determine its dimensions.

Rather than running these expensive tasks in each start up in the config function, it's better to defer these until alpha actually draws the output