=cut
-our $VERSION = '0.17';
+our $VERSION = '0.18';
=head1 VERSION
-Version 0.17
+Version 0.18
=head1 SYNOPSIS
our @EXPORT = qw(i3);
+use constant TYPE_RUN_COMMAND => 0;
use constant TYPE_COMMAND => 0;
use constant TYPE_GET_WORKSPACES => 1;
use constant TYPE_SUBSCRIBE => 2;
use constant TYPE_GET_MARKS => 5;
use constant TYPE_GET_BAR_CONFIG => 6;
use constant TYPE_GET_VERSION => 7;
+use constant TYPE_GET_BINDING_MODES => 8;
+use constant TYPE_GET_CONFIG => 9;
our %EXPORT_TAGS = ( 'all' => [
- qw(i3 TYPE_COMMAND TYPE_GET_WORKSPACES TYPE_SUBSCRIBE TYPE_GET_OUTPUTS
- TYPE_GET_TREE TYPE_GET_MARKS TYPE_GET_BAR_CONFIG TYPE_GET_VERSION)
+ qw(i3 TYPE_RUN_COMMAND TYPE_COMMAND TYPE_GET_WORKSPACES TYPE_SUBSCRIBE TYPE_GET_OUTPUTS
+ TYPE_GET_TREE TYPE_GET_MARKS TYPE_GET_BAR_CONFIG TYPE_GET_VERSION
+ TYPE_GET_BINDING_MODES TYPE_GET_CONFIG)
] );
our @EXPORT_OK = ( @{ $EXPORT_TAGS{all} } );
structure C<content> (or C<content>, encoded as utf8, if C<content> is a
scalar), if specified.
- my $reply = $i3->message(TYPE_COMMAND, "reload")->recv;
+ my $reply = $i3->message(TYPE_RUN_COMMAND, "reload")->recv;
if ($reply->{success}) {
say "Configuration successfully reloaded";
}
return $cv;
}
+=head2 get_config
+
+Gets the raw last read config from i3. Requires i3 >= 4.14
+
+=cut
+sub get_config {
+ my ($self) = @_;
+
+ $self->_ensure_connection;
+
+ $self->message(TYPE_GET_CONFIG);
+}
+
+
=head2 command($content)
Makes i3 execute the given command
$self->_ensure_connection;
- $self->message(TYPE_COMMAND, $content)
+ $self->message(TYPE_RUN_COMMAND, $content)
}
=head1 AUTHOR
Please report any bugs or feature requests to C<bug-anyevent-i3 at
rt.cpan.org>, or through the web interface at
-L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=AnyEvent-I3>. I will be
+L<https://rt.cpan.org/NoAuth/ReportBug.html?Queue=AnyEvent-I3>. I will be
notified, and then you'll automatically be notified of progress on your bug as
I make changes.
=item * RT: CPAN's request tracker
-L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=AnyEvent-I3>
+L<https://rt.cpan.org/NoAuth/Bugs.html?Dist=AnyEvent-I3>
=item * The i3 window manager website
-L<http://i3wm.org>
+L<https://i3wm.org>
=back
under the terms of either: the GNU General Public License as published
by the Free Software Foundation; or the Artistic License.
-See http://dev.perl.org/licenses/ for more information.
+See https://dev.perl.org/licenses/ for more information.
=cut