mirror of
https://github.com/swaywm/sway.git
synced 2026-02-17 22:05:53 -05:00
feat(workspace): add marks support to workspaces
Workspaces can now have marks just like containers. This enables the pattern of marking a workspace with [con_id=X] and then using "move container to mark" to reparent containers to workspaces. Changes: - Add marks list to sway_workspace struct - Add workspace_has_mark, workspace_add_mark, workspace_clear_marks, workspace_find_and_unmark, workspace_find_mark functions - Update mark command to work on workspaces when targeted via criteria - Update unmark command to support workspaces - Update move.c to find marks on workspaces for "move to mark" - Update criteria con_mark matching to also check workspaces - Add workspace marks to IPC JSON output 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
e7bd3f14e5
commit
b48239588f
7 changed files with 183 additions and 37 deletions
|
|
@ -48,6 +48,7 @@ struct sway_workspace {
|
|||
list_t *floating; // struct sway_container
|
||||
list_t *tiling; // struct sway_container
|
||||
list_t *output_priority;
|
||||
list_t *marks; // char *
|
||||
bool urgent;
|
||||
|
||||
struct sway_workspace_state current;
|
||||
|
|
@ -157,4 +158,14 @@ size_t workspace_num_sticky_containers(struct sway_workspace *ws);
|
|||
*/
|
||||
void workspace_squash(struct sway_workspace *workspace);
|
||||
|
||||
bool workspace_has_mark(struct sway_workspace *ws, char *mark);
|
||||
|
||||
void workspace_add_mark(struct sway_workspace *ws, char *mark);
|
||||
|
||||
void workspace_clear_marks(struct sway_workspace *ws);
|
||||
|
||||
bool workspace_find_and_unmark(char *mark);
|
||||
|
||||
struct sway_workspace *workspace_find_mark(char *mark);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue