mirror of
https://gitlab.com/hyask/swaysome.git
synced 2025-12-10 07:44:43 +01:00
Fix minimum output index
This commit is contained in:
parent
4620e8ab2c
commit
1c8ab4246a
1 changed files with 2 additions and 2 deletions
|
|
@ -566,9 +566,9 @@ fn rearrange_workspaces(stream: &UnixStream) {
|
|||
send_command(stream, &focus_cmd);
|
||||
|
||||
let output_index = workspace.num / 10;
|
||||
if output_index <= outputs.len() {
|
||||
if output_index <= outputs.len() - 1 {
|
||||
let mut move_cmd = move_cmd_prefix.clone();
|
||||
move_cmd.push_str(&outputs[output_index - 1].name);
|
||||
move_cmd.push_str(&outputs[output_index.max(1) - 1].name);
|
||||
send_command(stream, &move_cmd);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue