Maybe there is an error? The AnyEvent::i3 documentation mentions that ->command returns a result:
use Data::Dumper; sub handle { my($data)=@_; if($data->{change} eq "empty") { print "empty workspace!!\n"; my $switched; $switched = $i3->command("workspace 1")->cb(sub { my( $reply ) = @_; print "Switched back to workspace 1\n"; undef $switched; use Data::Dumper; print Dumper $reply; }); } }
In reply to Re^3: scripting i3 with Perl
by Corion
in thread scripting i3 with Perl
by morgon
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |