Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
/ vim-circadian Public archive
forked from adamnsch/vim-circadian

Set vim theme based on time of day.

Notifications You must be signed in to change notification settings

minkedup/vim-circadian

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

circadian.vim

A fork adamnsch's circadian.vim with some added custom functionality for my use-case.

Small plugin that lets one set a time of day for automatically switching between two specified themes (typically a light and dark theme).

Requirements

This plugin requires a version of Neovim or Vim that supports timers. For Vim this means versions >= 7.4.1578.

Installation

Install with your favorite vim plugin manager. For example using plug:

Plug 'adamnsch/vim-circadian'

Customizing

Time of day

By default the plugin will apply the daytime theme from 8 AM to 7 PM. This can be overridden the following way:

let g:circadian_day_start = 10
let g:circadian_night_start = 20

Note that "military time" is used to encode 8 PM as 20 here.

Specifying themes

By default the plugin will just set background to light and dark for day and night time respectively. [The background is no longer updated in this version, instead relying on a custom command to change variables].

Specify colorschemes that should be used the following way:

let g:circadian_day_theme = 'onehalflight'
let g:circadian_night_theme = 'onehalfdark'

Specifying Commands

This modified version of circadian.vim allows the user to execute an arbitrary command and/or set of command with command chaining. The custom command will always be executed before the theme is modified with colorscheme.

Custom commands should be specified the following way:

let g:circadian_day_cmds = "let x='somevalue'"
let g:circadian_night_cmds = "let x='someothervalue'"

About

Set vim theme based on time of day.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Vim Script 100.0%