diff --git a/CHANGELOG.md b/CHANGELOG.md index efda87e..b3ab22b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -62,6 +62,9 @@ having and using multiple runners. - Lua modules located in `hilbish.userDir.data .. '/hilbish/start'` (like `~/.local/share/hilbish/start/foo/init.lua`) will be ran on startup - `hilbish.init` hook, thrown after Hilbish has initialized Lua side +- Message of the day on startup (`hilbish.motd`), mainly intended as quick +small news pieces for releases. It is printed by default. To disable it, +set `hilbish.opts.motd` to false. ### Changed - **Breaking Change:** Upgraded to Lua 5.4. diff --git a/nature/opts/init.lua b/nature/opts/init.lua index d9de420..0b32f3f 100644 --- a/nature/opts/init.lua +++ b/nature/opts/init.lua @@ -23,7 +23,8 @@ local defaultOpts = { autocd = false, greeting = string.format([[Welcome to {magenta}Hilbish{reset}, {cyan}%s{reset}. The nice lil shell for {blue}Lua{reset} fanatics! -]], hilbish.user) +]], hilbish.user), + motd = true } for optsName, default in pairs(defaultOpts) do diff --git a/nature/opts/motd.lua b/nature/opts/motd.lua new file mode 100644 index 0000000..b22f5a2 --- /dev/null +++ b/nature/opts/motd.lua @@ -0,0 +1,13 @@ +local bait = require 'bait' +local lunacolors = require 'lunacolors' + +hilbish.motd = [[ +Hilbish 2.0 is a {red}major{reset} update! If your config doesn't work +anymore, that will definitely be why! A MOTD, very message, much day. +]] + +bait.catch('hilbish.init', function() + if hilbish.opts.motd then + print(lunacolors.format(hilbish.motd)) + end +end)