Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
A perl script that will make text from conky gradient in dzen
Perl
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
README.md
gradient

README.md

gradient

Gradient is a small perl script that will make text appear in a gradient color when viewed with dzen. I made it so that I could have a gradient output in dzen, based on input from conky.

Features

  • Text is read from STDIN, processed, then output to STDOUT, making it easy to pipe from conky to dzen
  • Start and stop color is given as command arguments
  • Number of steps in gradient is based on printable characters in input (not counting spaces)
  • Control sequences in input, for dzen, is not touched or processed

Requirements

In order to run gradient you need Color::Spectrum from CPAN.

Installation

Put script in a suitable location (making sure its path is in $PATH or use full path when running gradient) Make sure it's executable by running:

chmod +x <path to script>

Running gradient

gradient will read text from standard input and calculate the number of steps in the gradient based on the number of visible characters, not counting spaces and control sequences for dzen. The result is then printed to standard output.
In order to make a gradient from red to green, using conky and dzen, this is what you would run:

conky | gradient FF0000 0000FF | dzen ...

And the result will look something like this:

Sample output of above code

Known bugs

No known bugs, but the detection of dzen color sequences is rather naive so you may run in to problems if you use advanced ones.

Contact

Feature requests, patches or what ever else related to gradient can be sent
to: johan dot stenarson at gmail dot com

Copyright and license

Copyright (C) 2013 by Johan Stenarson

Licensed under GPL

Something went wrong with that request. Please try again.