Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 21 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,17 +74,32 @@ Check if all colors are defined:
## Key binding example for urxvt
Save this to a file named "urxvt-colors":

sub on_user_command {
my ($self, $cmd) = @_;
my $output = `dynamic-colors cycle`;
$self->cmd_parse($output);
}
#! perl -w

sub cycle {
my ($self) = @_;

my $output = `dynamic-colors cycle`;
$self->cmd_parse($output);

()
}

sub on_user_command {
my ($self, $cmd) = @_;

if ($cmd eq "urxvt-colors:cycle") {
$self->cycle;
}

()
}

Add this to ~/.Xdefaults:

urxvt*perl-ext-common: urxvt-colors
urxvt*perl-lib: [directoy of urxvt-colors]
urxvt*keysym.F12: perl:urxvt-colors:
urxvt*keysym.F12: perl:urxvt-colors:cycle

Now you can cycle through all color schemes using F12 for example,
without closing running console applications.
Expand Down