diff options
-rwxr-xr-x | bin/i3-switch-workspace | 11 | ||||
-rw-r--r-- | i3/config | 2 |
2 files changed, 3 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) { @@ -21,6 +21,8 @@ client.urgent #ff0000 #ff0000 #ffffff #ff0000 floating_minimum_size 1 x 1 floating_maximum_size -1 x -1 +focus_wrapping no + # floats for_window [class="Xmessage"] floating enable for_window [class="qemu"] floating enable |