mirror of
https://github.com/swaywm/sway.git
synced 2025-10-29 05:40:18 -04:00
Implement strip_workspace_name.
This commit is contained in:
parent
001ec1f3fd
commit
4bd46fb079
16 changed files with 88 additions and 32 deletions
|
|
@ -1,4 +1,4 @@
|
|||
#define _XOPEN_SOURCE 700
|
||||
#define _POSIX_C_SOURCE 200809L
|
||||
#include <assert.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
|
@ -23,7 +23,8 @@ int numlen(int n) {
|
|||
if (n == 0) {
|
||||
return 1;
|
||||
}
|
||||
return log10(n) + 1;
|
||||
// Account for the '-' in negative numbers.
|
||||
return log10(abs(n)) + (n > 0 ? 1 : 2);
|
||||
}
|
||||
|
||||
static struct modifier_key {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue