diff options
author | Boris Faure <billiob@gmail.com> | 2014-08-17 22:20:40 +0200 |
---|---|---|
committer | Boris Faure <billiob@gmail.com> | 2014-08-17 22:20:40 +0200 |
commit | 6c50375f26b977d75187b6e88dd3acf088597470 (patch) | |
tree | 74d39dc34e2ca63e554cbac65ba90d23f00f34b4 /tools | |
parent | 93e2d73a872f4b66ac586103f6c2c83512fd65eb (diff) |
Party time! be able to set foreground color
Reset is not yet implemented for that…
Idea is from http://www.reddit.com/r/linux/comments/2ds0he/xterm_party/
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/party.pl | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/party.pl b/tools/party.pl new file mode 100755 index 0000000..905fdcb --- /dev/null +++ b/tools/party.pl | |||
@@ -0,0 +1,11 @@ | |||
1 | #!/usr/bin/env perl | ||
2 | use Time::HiRes qw(sleep); | ||
3 | $|++; | ||
4 | $A=0; | ||
5 | $F=0.1; | ||
6 | while (1) { | ||
7 | $A == 628318 ? $A=0 : ++$A; | ||
8 | ($R, $B, $G) = map { sin($F*$A + $_) * 127 + 128 } qw(0 2 4); | ||
9 | printf "\033]10;#%02x%02x%02x\007", $R, $B, $G; | ||
10 | sleep 0.01; | ||
11 | } | ||