/winddown.nvim

An unconcious screen time reminder.

Primary LanguageLua

winddown.nvim

Remind you of screen time by fading out your colorscheme.

(Neovim port of vscode-winddown)

Install

packer:

use { "zenlian/winddown.nvim" }

lazy.nvim:

require("lazy").setup {
  { "zenlian/winddown.nvim" },
}

Configuration

require('winddown').setup {
  coding_minutes = 25, -- keep coding for 25 minutes, colors will start fading out
  fade_minutes = 5, -- time before colors completely faded
  break_minutes = 5, -- no activity in 5 minutes, then colors will be normal
  fps = 12,
  auto_start = true,
  events = "KeyPress", -- "KeyPress" for every key input, or events like `{ "CursorMoved", "InsertCharPre" }`
  integrations = {
    treesitter = true,
  },
  highlights = {
    ["Normal"] = { fg = "fg", bg = "bg" },
  },
}

API

vim.keymap.set("n", '<leader>R', function ()
  require("winddown").reset()
end)

TODO

  • API to pause/postpone
  • config options explanation
  • more integrations

Credits