]> git.sur5r.net Git - i3/i3/blobdiff - AnyEvent-I3/lib/AnyEvent/I3.pm
Introduce the GET_CONFIG IPC request
[i3/i3] / AnyEvent-I3 / lib / AnyEvent / I3.pm
index 875f379018dd3dffad7c2d985d6517971f8cce63..5ce3c016ca0ff4ddb1d45acb470eaf4a22ddc39c 100644 (file)
@@ -95,10 +95,13 @@ use constant TYPE_GET_TREE => 4;
 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)
+       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} } );
@@ -501,6 +504,20 @@ sub get_version {
     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