use built-in urxvt::anyevent
This commit is contained in:
parent
79d255272d
commit
27516b6209
@ -7,9 +7,7 @@ stdenv.mkDerivation rec {
|
|||||||
src = ./src;
|
src = ./src;
|
||||||
|
|
||||||
passthru.perlPackages = with perlPackages;
|
passthru.perlPackages = with perlPackages;
|
||||||
[ AnyEvent LinuxFD SubExporter
|
[ LinuxFD ] ++ LinuxFD.requiredPerlModules;
|
||||||
DataOptList ParamsUtil SubInstall
|
|
||||||
];
|
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
install -D -m644 "$src"/* -t "$out/lib/urxvt/perl"
|
install -D -m644 "$src"/* -t "$out/lib/urxvt/perl"
|
||||||
|
@ -5,7 +5,7 @@ use strict;
|
|||||||
use warnings;
|
use warnings;
|
||||||
no warnings "experimental";
|
no warnings "experimental";
|
||||||
|
|
||||||
use AnyEvent;
|
use urxvt;
|
||||||
use Linux::FD qw(signalfd);
|
use Linux::FD qw(signalfd);
|
||||||
use POSIX;
|
use POSIX;
|
||||||
use File::Basename qw(dirname);
|
use File::Basename qw(dirname);
|
||||||
@ -47,9 +47,9 @@ sub build_command {
|
|||||||
if (my ($col, $row) = $resources{$_} =~ /(\d+)x(\d+)/) {
|
if (my ($col, $row) = $resources{$_} =~ /(\d+)x(\d+)/) {
|
||||||
$cmd .= "\e[8;${row};${col}t";
|
$cmd .= "\e[8;${row};${col}t";
|
||||||
}
|
}
|
||||||
next RESOURCE;
|
next;
|
||||||
}
|
}
|
||||||
default { next RESOURCE }
|
default { next }
|
||||||
}
|
}
|
||||||
my $val = $resources{$_};
|
my $val = $resources{$_};
|
||||||
$cmd .= "\e]$key;$val\a";
|
$cmd .= "\e]$key;$val\a";
|
||||||
@ -65,8 +65,8 @@ sub reload_all {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
our $watch = AnyEvent->io (
|
our $watch = urxvt::anyevent->io (
|
||||||
fh => $sigfd, # which file handle to check
|
fh => $sigfd, # which file handle to check
|
||||||
poll => "r", # which event to wait for ("r"ead data)
|
poll => "r", # which event to wait for ("r"ead data)
|
||||||
cb => sub { # what callback to execute
|
cb => sub { # what callback to execute
|
||||||
sysread $sigfd, my $dummy, 4096;
|
sysread $sigfd, my $dummy, 4096;
|
||||||
|
Loading…
Reference in New Issue
Block a user