mirror of
https://github.com/swaywm/sway.git
synced 2025-11-06 13:29:50 -05:00
Merge pull request #44 from Luminarys/master
Added in workspace next/prev and workspace output_next/prev
This commit is contained in:
commit
7f4529ec8b
3 changed files with 114 additions and 0 deletions
|
|
@ -342,6 +342,28 @@ static bool cmd_workspace(struct sway_config *config, int argc, char **argv) {
|
|||
return false;
|
||||
}
|
||||
|
||||
// Handle workspace next/prev
|
||||
if (strcmp(argv[0], "next") == 0) {
|
||||
workspace_next();
|
||||
return true;
|
||||
}
|
||||
|
||||
if (strcmp(argv[0], "prev") == 0) {
|
||||
workspace_next();
|
||||
return true;
|
||||
}
|
||||
|
||||
// Handle workspace output_next/prev
|
||||
if (strcmp(argv[0], "output_next") == 0) {
|
||||
workspace_output_next();
|
||||
return true;
|
||||
}
|
||||
|
||||
if (strcmp(argv[0], "output_prev") == 0) {
|
||||
workspace_output_prev();
|
||||
return true;
|
||||
}
|
||||
|
||||
swayc_t *workspace = workspace_find_by_name(argv[0]);
|
||||
if (!workspace) {
|
||||
workspace = workspace_create(argv[0]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue