KeepEye is a vim plugin that invites you to take a break after a huge coding session. By default, it will notify you after 25min, with the message at the middle of your status line:
SAVE YOUR EYES, TAKE A BREAK.
What's new ?
- 05/30 - add system notification feature for Mac based on terminal-notifier (thanks to @crisidev)
- 05/26 - [BREAKING CHANGES] due to a lot of new features these days, a good refactor was mandatory to maintain more easily this plugin in the future. You will be notified at plugin startup if you use an obsolete option (see plugin/keepeye.vim)
- 05/25 - add support for custom audio player (thanks to @trmendes)
- 05/25 - add lightline.vim integration
- 05/25 - add User hl-group support (thanks to @kristijanhusak)
- 05/25 - add vim-airline integration
- 05/24 - add bell sound feature
- 05/23 - add system notification feature for Linux (thanks to @stsewd)
Plug 'soywod/vim-keepeye' " with vim-plug
:KeepEye " to (re)start the timer :KeepEyeClear " to clear the message and reset the status bar
Launch the plugin at vim startup
let g:keepeye_autostart = boolean " Default v:true
Setup features to activate when reach the timer
let g:keepeye_features = ['bell', 'notification', 'statusline'] " Default ['statusline'] " The bell feature plays a bell song (1) " The notification feature shows a system notification (2) " The statusline feature put a message in your statusline
Set the message to show (used by notification and statusline features)
let g:keepeye_message = string " Default 'SAVE YOUR EYES, TAKE A BREAK'
Set the work time
let g:keepeye_timer = integer " Default 1500 (25min)
(1) The default player used is mpv
(2) Only Linux systems are supported for now
Use hl user to color the statusline message (1)
let g:keepeye_message_hl_user = integer | v:null " Default v:null
Set a custom player for the bell feature
let g:keepeye_feature_bell_cmd = string " Default 'mpv'
Set custom player flags for the bell
let g:keepeye_feature_bell_cmd_flags = string " Default ''
Set a custom audio file for the bell
let g:keepeye_feature_bell_audio_path = string " Default '<PLUGIN_FOLDER>/media/bell.mp3'
(1) See examples, or
To get the message
-- BREAK TIME -- with a notification and a bell sound
let g:keepeye_features = ['bell', 'notification'] let g:keepeye_message = '-- BREAK TIME --'
To color your statusline in red via the hl group
highlight User1 guifg=#ffffff guifb=#ff0000 let g:keepeye_features = ['statusline'] let g:keepeye_message_hl_user = 1
To use moc player to ring the bell (instead of mpv)
let g:keepeye_features = ['bell'] let g:keepeye_feature_bell_cmd = 'mocp' let g:keepeye_feature_bell_cmd_flags = '-l'