Skip to content

Latest commit

 

History

History
61 lines (45 loc) · 1.48 KB

README.md

File metadata and controls

61 lines (45 loc) · 1.48 KB

myeyeshurt

alt text

About the Plugin

The 20-20-20 rule suggests taking a break every 20 minutes to focus your eyes on something at least 20 feet away, for at least 20 seconds.

With this plugin, ASCII snowflakes begin to fall across your screen once you've been active for 20 minutes, reminding you to take a much-needed break. Initially, a few snowflakes appear, but as time continues without a break, their number grows into a blizzard compelling you to pause and rest your eyes.

Installation

{
    "wildfunctions/myeyeshurt",
    opts = {}
}

Custom Installation

{
    "wildfunctions/myeyeshurt",
    opts = {
      initialFlakes = 1,
      flakeOdds = 20,
      maxFlakes = 750,
      nextFrameDelay = 175,
      useDefaultKeymaps = true,
      flake = {'*', '.'},
      minutesUntilRest = 20
    }
}

Default Setup

These are the default keymaps:

<leader>ms : trigger flakes (this happens automatically, but it's fun to manually trigger)
<leader>mx : stop flakes 

Custom Keymaps can be set like the following code:

  vim.keymap.set("n", "<leader>ms", function() require("myeyeshurt").start() end, {noremap = true, silent = true})
  vim.keymap.set("n", "<leader>mx", function() require("myeyeshurt").stop() end, {noremap = true, silent = true})

Issues

Make an issue if you see anything that can be improved.