Skip to content
This repository has been archived by the owner on Apr 18, 2023. It is now read-only.

Commit

Permalink
i3-save-tree: Exclude unsupported "transient_for" property
Browse files Browse the repository at this point in the history
Even if i3 supported matching windows through "transient_for", it
wouldn't be useful for the purpose of i3-save-tree.
  • Loading branch information
orestisfl committed Sep 12, 2018
1 parent 484854d commit a66048a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions i3-save-tree
Expand Up @@ -123,9 +123,7 @@ sub strip_containers {
delete $tree->{current_border_width} if $tree->{current_border_width} == -1;

for my $key (keys %$tree) {
next if exists($allowed_keys{$key});

delete $tree->{$key};
delete $tree->{$key} unless exists($allowed_keys{$key});
}

for my $key (qw(nodes floating_nodes)) {
Expand Down Expand Up @@ -169,7 +167,8 @@ sub dump_containers {
if (leaf_node($tree)) {
my $swallows = {};
for my $property (keys %{$tree->{window_properties}}) {
$swallows->{$property} = '^' . quotemeta($tree->{window_properties}->{$property}) . '$';
$swallows->{$property} = '^' . quotemeta($tree->{window_properties}->{$property}) . '$'
if $property ne 'transient_for';
}
$tree->{swallows} = [ $swallows ];
}
Expand Down

0 comments on commit a66048a

Please sign in to comment.