/usr/share/doc/libcurses-ui-perl/examples/demo-color is in libcurses-ui-perl 0.9609-1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | #!/usr/bin/perl -w
use strict;
use warnings;
#use diagnostics;
use FindBin;
use lib "$FindBin::RealBin/../lib";
use Curses::UI;
my $cui = new Curses::UI(-color_support => 1,
-clear_on_exit => 0);
my $co = $Curses::UI::color_object;
my @colors = $co->get_colors();
my @labels;
my $mainw = $cui->add('screen', 'Window');
for my $i (0..$ENV{LINES} - 1) {
my $label =$mainw->add("label$i",'Label', -fg => $colors[int rand @colors],
-bg => $colors[int rand @colors],
-text => " " x $i . "Curses::UI::Color",
-paddingspaces => 1,
-width => -1,
-y => $i);
push @labels, $label;
}
$cui->draw();
while (1) {
my $nr = int rand @labels;
$labels[$nr]->set_color_fg($colors[int rand @colors]);
$labels[$nr]->set_color_bg($colors[int rand @colors]);
$cui->draw();
}
|