Git Product home page Git Product logo

dusk-til-dawn.nvim's Introduction

Dusk-til-Dawn.nvim

Automatically change colorscheme based on time

Install

Vim Plug

Plug 'Th3Whit3Wolf/Dusk-til-Dawn.nvim'

" And then somewhere in your init.vim
lua require'Dusk-til-Dawn'.timeMan()()

Minpac

call minpac#add('Th3Whit3Wolf/Dusk-til-Dawn.nvim')

" And then somewhere in your init.vim
lua require'Dusk-til-Dawn'.timeMan()()

Vim Packages

In the terminal execute this command.

cd ~/.local/share/nvim/site/pack/start/
git clone https://github.com/Th3Whit3Wolf/Dusk-til-Dawn.nvim

In your init.vim add the following

" And then somewhere in your init.vim after the above command
lua require'Dusk-til-Dawn'.timeMan()()

Configuration

If you use Sway Color Daemon you can use the sunrise and sunset values it creates.

Configuration Function Default
g:dusk_til_dawn_morning Sets time when day begins 7 (7 am)
g:dusk_til_dawn_night Sets time when day ends 19 (7 pm)
g:dusk_til_dawn_light_theme Sets light theme morning
g:dusk_til_dawn_dark_theme Sets dark theme evening
g:dusk_til_dawn_debug Turns on debug mode (strobe effect) false
g:dusk_til_dawn_sway_colord Will use values create by sway-color false

Commands

Commands Function
ChangeColor Toggles colorscheme

How to do more than set colors

require("Dusk-til-Dawn").timeMan(
    function()
        require('indent_guides').setup(
    {
        even_colors = {fg = "#d3d3e7", bg = "#d3d3e7"},
        odd_colors = {fg = "#e7e5eb", bg = "#e7e5eb"},
        indent_space_guides = true,
        indent_tab_guides = true,
        indent_guide_size = 4
    }
)
require('indent_guides').indent_guides_enable()
    end,
    function()
        require('indent_guides').setup(
            {
                even_colors = {fg = "#5C5E61", bg = "#5C5E61"},
                odd_colors = {fg = "#434548", bg = "#434548"},
                indent_space_guides = true,
                indent_tab_guides = true,
                indent_guide_size = 4
            }
        )
        require('indent_guides').indent_guides_enable()
    end
)()

NOTE

  • Vim is not supported because the plugin is written in lua.
  • Will set colorscheme on initialization (no need to use colorscheme x just set colorscheme with g:dusk_til_dawn_light_theme and g:dusk_til_dawn_dark_theme)

Special Thanks

dusk-til-dawn.nvim's People

Contributors

th3whit3wolf avatar vzctl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

vzctl

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.