Giter Club home page Giter Club logo

lighthouse.el's Introduction

Lighthouse.el

This is package wraps the functionality of the lighthouse command line tool and allows changing your lights from inside doom-emacs. It also has these fun minor modes:

  • changing colors based on which buffer major mode is active
  • changing colors based on how fast you are using Emacs

Disclaimer

This package is developed for doom-emacs so tweaking and PRs are welcome to make it more generic. The package is in active development.

Demo

Dependencies

You need the lighthouse binary in your path.

Please follow the installation guide for lighthouse.

Usage

lighthouse-mode

Basic hue lights control commands.

Enable lighthouse-mode in your init.el or using:

M-x lighthouse-mode

Then try SPC l to see the bindings.

lightspeed-mode

Track how many commands (actions) your are doing in the span of 15 seconds and alter the lights based on that. The more actions you perform the brighter the lights are.

The brightness is bound between 0 - 254 in the lighthouse binary, hence the calculation are done as min((actions_per_15_s * 1.5), 254) and the transitions are set to take in 15 seconds (Note: I am not certain this setting is correctly respected by the Hue as it seems to take less time).

Enable lighthouse-speed-mode in your init.el or using:

M-x lightspeed-mode

lighthouse-tracking-mode

Tracks which buffers you are in and changes light color based on the buffer type. Swapping from one active window to the next one will trigger the changes. Opening a new buffer with a new major mode will also trigger color changes.

Enable lighthouse-tracking-mode in your init.el or using

M-x lighthouse-tracking-mode

Currently supported modes and their colors:

  • ff00ff - python
  • ff0000 - rustic (Rust)
  • ff00ff - org-mode
  • f47883 - emacs-lisp-mode
  • ffd300 - web-mode (HTML)
  • ff0000 - css-mode

In order to use your own mode to color mapping, alter the lighthouse-alist variable as this association list is what maps minor-modes to colors.

lighthouse.el's People

Contributors

finnkauski avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

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.