Warning: session_start(): open(/var/lib/php/sessions/sess_ak3h6gt22c8rr82ndbsts8gbf3, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
/*
The first column always contains the window identity as a hexadecimal integer.
The second column always contains the desktop number (a -1 is used to identify a sticky window).
If the -p option is specified the next column will contain the PID for the window as a decimal integer.
If the -G option is specified then four integer columns will follow: x-offset, y-offset, width and height.
The next column always contains the client machine name.
The remainder of the line contains the window title (possibly with multiple spaces in the title).
*/
sclass wmctrl_Entry {
S windowTitle;
S windowIdentity;
int desktopNumber;
int pid;
Rect bounds;
S machineName;
}
static L linux_parse_wmctrl_lpG_output(S output) {
ret map_pcall(tlft(output), func(S s) -> wmctrl_Entry {
L streaks = takeFirst(8, nonStreaks(f isSpace, characters(s)));
LS l = intRangeSubstrings(s, streaks);
ret nu(wmctrl_Entry,
windowTitle := trimSubstring(s, last(streaks).end),
windowIdentity := l.get(0),
desktopNumber := parseInt(l.get(1)),
pid := parseInt(l.get(2)),
bounds := rect(parseInt(l.get(3)), parseInt(l.get(4)), parseInt(l.get(5)), parseInt(l.get(6))),
machineName := l.get(7));
});
}