Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
061af6f928 | |||
01992d7697 | |||
2c929cd7f7 | |||
569a135445 |
@ -99,12 +99,35 @@ class Window
|
||||
return false;
|
||||
}
|
||||
|
||||
public function getWindowGeometry()
|
||||
{
|
||||
exec("xdotool getwindowgeometry --shell {$this->windowId}", $output, $status);
|
||||
$ret = [];
|
||||
foreach ($output as $line) {
|
||||
list($k,$v) = explode("=",$line,2);
|
||||
$ret[strtolower($k)]=$v;
|
||||
}
|
||||
return (object)$ret;
|
||||
}
|
||||
|
||||
public function setWindowSize($width, $height)
|
||||
{
|
||||
exec("xdotool windowsize {$this->windowId} {$width} {$height}");
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function windowMinimize()
|
||||
{
|
||||
exec("xdotool windowminimize {$this->windowId}");
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function windowRestore()
|
||||
{
|
||||
exec("xdotool windowmap {$this->windowId} windowraise {$this->windowId}");
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function dump()
|
||||
{
|
||||
$size = $this->getWindowSize();
|
||||
|
Reference in New Issue
Block a user