Nighttime Peanut Migrations
Miss any of our Open RFC calls?Watch the recordings here! »

nightenv

0.3.2 • Public • Published

🌙 nightenv npm

nightenv can be configured to change your editor themes, OS themes, and more based on the time of day.

Table of Contents

Requirements

  • node >= 6.11

Installation

npm i -g nightenv
nightenv

nightenv can be run multiple times without side effects. To uninstall, find the entry in your crontab via crontab -e and remove it, followed by npm rm -g nightenv.

Usage

nightenv can be configured via ~/.nightenv.json. Add a new entry based on sample configuration provided by your plugins.

nightenv plugins

Terminals

Editors/IDEs

Productivity

OS

Create your own plugin

To create your own plugin, create a JavaScript file that exports a execute function, like so:

module.exports.execute = function(config, isNight) {
 
  // config is an object that contains configuration arbitrarily
  // defined by your plugin
 
  // isNight is a boolean that represents whether it is night time
 
  // this function should return a promise with the configuration
  // containing any updates if there are any, giving your plugin
  // the ability to maintain state
 
};

About

After many days of switching between dark and light themes to reduce eye strain, I needed an automated solution, hence nightenv. This is not meant to be a state of the art piece of software, but instead it was meant to be a quick and easy tool that could be easily extended. Feel free to contribute new plugins or update the already existing ones if you have any issues.

Credits to themer and mjswensen for the inspiration to whip this together.

Roadmap

Will probably declare v1 after the following items are compeleted, not in any particular order:

  • tests / coverage
  • tmux
  • vim
  • slack
  • Windows 10
  • Linux
  • ?

Install

npm i nightenv

DownloadsWeekly Downloads

14

Version

0.3.2

License

MIT

Unpacked Size

30.7 kB

Total Files

16

Last publish

Collaborators

  • avatar