php-x11/examples/select_and_grow.php

16 lines
365 B
PHP

<?php
require_once __DIR__."/../vendor/autoload.php";
use NoccyLabs\X11\WindowSelector;
$selector = new WindowSelector();
// Select window
printf("Click a window to select it...\n");
$window = $selector->select();
$window->dump();
// Grow the window by 10 pixels
$size = $window->getWindowSize();
$window->setWindowSize($size->width + 10, $size->height + 10);