diff options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/i3-switch-workspace | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/bin/i3-switch-workspace b/bin/i3-switch-workspace index a90be29..8e77cf2 100755 --- a/bin/i3-switch-workspace +++ b/bin/i3-switch-workspace @@ -46,16 +46,10 @@ elsif ($workspace_data->[0]{focused} && $dir eq 'prev') { my $tree_data = $json->decode(i3_msg('get_tree')); my $workspace_tree = find_workspace($tree_data, $current_workspace); if (@{ $workspace_tree->{nodes} } || @{ $workspace_tree->{floating_nodes} }) { - if ($prev_workspace < 0) { - i3_msg('command', "workspace number $next_workspace"); - } - else { + if ($prev_workspace > 0) { i3_msg('command', "workspace number $prev_workspace"); } } - else { - i3_msg('command', "workspace $dir"); - } } elsif ($workspace_data->[-1]{focused} && $dir eq 'next') { my $current_workspace = $workspace_data->[-1]{num}; @@ -64,9 +58,6 @@ elsif ($workspace_data->[-1]{focused} && $dir eq 'next') { if (@{ $workspace_tree->{nodes} } || @{ $workspace_tree->{floating_nodes} }) { i3_msg('command', "workspace number $next_workspace"); } - else { - i3_msg('command', "workspace $dir"); - } } else { for my $i (0..$#$workspace_data) { |