-
-
Notifications
You must be signed in to change notification settings - Fork 154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added move-workspace-to-index
and move-workspace-to-monitor
IPC actions
#947
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry it took a while to get to this
src/layout/mod.rs
Outdated
@@ -3745,6 +3745,77 @@ impl<W: LayoutElement> Layout<W> { | |||
monitor.move_workspace_up(); | |||
} | |||
|
|||
pub fn move_workspace_to_idx(&mut self, output: Output, old_idx: usize, new_idx: usize) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add an entry for this into the Op
enum in the tests module at the bottom of the file for randomized tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should I also create test cases or will adding them to the enum do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding them to the enum will already suffice, but adding test cases for the tricky edge cases would be welcome. When doing that I usually comment out the relevant edge case to verify that the unit test will fail.
src/layout/mod.rs
Outdated
monitor.move_workspace_to_idx(old_idx, new_idx); | ||
} | ||
|
||
pub fn move_workspace_to_output_by_id( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also please add into Op
.
Title says it all, this allows for more scriptability in workspace handling (moving specific workspaces to specific locations when needed) without relying on only moving the active workspace.
Closes #942.