-
Notifications
You must be signed in to change notification settings - Fork 196
Expo: add keyboard interaction #1156
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
Conversation
Arrows keys can be used to select a target workspace, enter to change, esc to cancel. Also added shading to unselected workspaces.
…uld not be handled
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.
I know this isn't ready but had some time for reviews today so here you go :)
plugins/single_plugins/expo.cpp
Outdated
@@ -71,8 +74,18 @@ class wayfire_expo : public wf::plugin_interface_t | |||
} state; | |||
|
|||
int target_vx, target_vy; | |||
int initial_vx, initial_vy; |
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.
use wf::point_t
in new code :) makes it easier to use if we need to pass the points around.
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.
Makes sense, I changed for both (didn't make sense to have separate x/y for target if initial workspace is wf::point_t)
plugins/single_plugins/expo.cpp
Outdated
std::unique_ptr<wf::workspace_wall_t> wall; | ||
|
||
wf::option_wrapper_t<int> delay{"input/kb_repeat_delay"}; |
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.
Feels like we're duplicating code already written here: https://github.com/WayfireWM/wayfire/blob/master/plugins/scale/scale-title-filter.cpp#L19
Maybe we can extract that struct in plugins/common/...
and re-use it whenever we need key repeat?
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.
Yes, that makes sense; I've moved it there
If you're not particularly interested in this, I think it should be fine to just handle HJKL and leave this for later. |
I've addressed the code review comments and did some more testing, so I think this is now ready :) |
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.
Looks good, thanks!
Fixes #1142
Arrows keys can be used to select a target workspace, enter to change, esc to cancel.
Also added shading to unselected workspaces.
TODO:
workspace-wall
is used