howm
howm
workspace.h File Reference

howm More...

#include <stddef.h>

Go to the source code of this file.

Functions

void kill_ws (monitor_t *m, workspace_t *ws)
 Kills the given workspace. More...
 
void focus_next_ws (void)
 Focus the next workspace. More...
 
workspace_toffset_ws (workspace_t *ws, int offset)
 Return a workspace after offsetting. More...
 
void focus_prev_ws (void)
 Focus the previous workspace. More...
 
void focus_last_ws (void)
 Focus the last focused workspace. More...
 
void change_ws (const workspace_t *ws)
 Change to a different workspace and map the correct windows. More...
 
uint32_t workspace_to_index (const workspace_t *ws)
 Find and return a workspace's index in the workspace list. More...
 
workspace_tindex_to_workspace (const monitor_t *m, uint32_t index)
 Convert a workspace's index in a workspace list to an index. More...
 
void add_ws (monitor_t *m)
 Create a new workspace and update global state. More...
 
void remove_ws (monitor_t *m, workspace_t *ws)
 Remove a workspace and update the global state. More...
 

Detailed Description

howm

Author
Harvey Hunt
Date
2015

Function Documentation

void add_ws ( monitor_t m)

Create a new workspace and update global state.

Parameters
mThe monitor that the workspace should be added on.
workspace_t* index_to_workspace ( const monitor_t m,
uint32_t  index 
)

Convert a workspace's index in a workspace list to an index.

Parameters
mThe monitor to search for the workspace on.
indexThe index to search for.
Returns
The workspace stored at the index of the workspaces list.
void kill_ws ( monitor_t m,
workspace_t ws 
)

Kills the given workspace.

Parameters
mThe monitor that the workspace to be killed is on.
wsThe workspace to be killed.
workspace_t* offset_ws ( workspace_t ws,
int  offset 
)
inline

Return a workspace after offsetting.

Use this to safely traverse the workspace list - instead of doing:

 ws->next->next

do:

 offset_ws(ws, 2)
Parameters
wsThe workspace to be offset from.
offsetThe offset to apply
Returns
The workspace at ws+offset.
void remove_ws ( monitor_t m,
workspace_t ws 
)

Remove a workspace and update the global state.

Parameters
mThe monitor that the workspace is on.
wsThe workspace to be removed.
uint32_t workspace_to_index ( const workspace_t ws)

Find and return a workspace's index in the workspace list.

Parameters
wsThe workspace to search for.
Returns
The index of the workspace in the workspace list.