summaryrefslogtreecommitdiff
path: root/tools/party.pl
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2014-08-17 22:20:40 +0200
committerBoris Faure <billiob@gmail.com>2014-08-17 22:20:40 +0200
commit6c50375f26b977d75187b6e88dd3acf088597470 (patch)
tree74d39dc34e2ca63e554cbac65ba90d23f00f34b4 /tools/party.pl
parent93e2d73a872f4b66ac586103f6c2c83512fd65eb (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 '')
-rwxr-xr-xtools/party.pl11
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
2use Time::HiRes qw(sleep);
3$|++;
4$A=0;
5$F=0.1;
6while (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}