Coder Social home page Coder Social logo

dynamic-colors's Introduction

dynamic-colors

Utility for changing terminal colors on the fly.

Fork of abandoned sos4nt/dynamic-colors.

Pre-requisites

Your terminal must support the appropriate OSC escape sequences. xterm and urxvt (rxvt-unicode) work, whereas e.g. Terminal.app or iTerm won't recognize these sequences.

Make sure dynamicColors is enabled in ~/.Xresources

xterm*dynamicColors: true
urxvt*dynamicColors: on

Setup

  1. Add dynamic-colors file to your PATH.

  2. Put your colorschemes in the configuration directory (commonly ~/.config/dynamic-colors/colorschemes), or set $DYNAMIC_COLORS_COLORSCHEMES environment variable to desired path.

  3. To enable auto-completion, add this into your shell configuration file:

    source $HOME/.dynamic-colors/completions/dynamic-colors.(zsh|bash)

Usage

List available color schemes:

dynamic-colors list

Switch to a color scheme:

dynamic-colors switch solarized-dark

Reload last color scheme:

dynamic-colors init

Key binding example for urxvt

Save this to ~/.urxvt/ext/dynamic-colors:

sub on_action {
  my ($self, $cmd) = @_;
  if ($cmd eq "cycle") {
    my $output = `dynamic-colors cycle`;
    $self->cmd_parse($output);
  }
}

And bind the key in ~/.Xresources:

urxvt*perl-ext-common: dynamic-colors
urxvt*keysym.F12: dynamic-colors:cycle

Now you can cycle through all color schemes using F12 without closing running console applications.

dynamic-colors's People

Contributors

cschol avatar danielrichtmann avatar hellricer avatar pzl avatar sos4nt avatar willtim 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.