mirror of
https://github.com/n3w/helpers-functions-cli.git
synced 2025-12-19 12:43:22 +00:00
Added get_window_size() function
This commit is contained in:
parent
233fee602d
commit
4985979992
1 changed files with 10 additions and 0 deletions
|
|
@ -102,3 +102,13 @@ Examples:
|
|||
);
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists(__NAMESPACE__.'get_window_size')) {
|
||||
function get_window_size(): array
|
||||
{
|
||||
return [
|
||||
'cols' => exec('tput cols'),
|
||||
'lines' => exec('tput lines'),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue