Feature: Workspace assignment by number

Workspace assignments with bare numbers assign all workspaces with that
number to the specified output.

Workspace assignment by number is overridden by workspace assignment by
name.
This commit is contained in:
Tony Crisci
2014-05-17 23:36:58 -04:00
committed by Michael Stapelberg
parent cfd06718fc
commit f41e81bd96
5 changed files with 142 additions and 17 deletions

View File

@ -58,6 +58,19 @@ int max(int a, int b);
bool rect_contains(Rect rect, uint32_t x, uint32_t y);
Rect rect_add(Rect a, Rect b);
/**
* Returns true if the name consists of only digits.
*
*/
__attribute__((pure)) bool name_is_digits(const char *name);
/**
* Parses the workspace name as a number. Returns -1 if the workspace should be
* interpreted as a "named workspace".
*
*/
long ws_name_to_number(const char *name);
/**
* Updates *destination with new_value and returns true if it was changed or false
* if it was the same