xterm_get_geometry(3f) - [M_xterm] obtain xterm(1) screen size in character units (LICENSE:MIT)
Synopsis
Description
Example
Author
License
subroutine xterm_get_geometry(rows,cols)
integer,intent(out) :: rows integer,intent(out) :: cols
Sends an escape sequence to stdout to query the size of an xterm(1) window. The number of character rows and character columns is returned.For this to work stdout must be your terminal device; so this may not work effectively in a pipe or when redirection is used, depending on your system.
A sample program:
program demo_xterm_get_geometry use M_xterm, only : xterm_get_geometry implicit none integer :: irows, icols call xterm_get_geometry(irows,icols) write(*,*)’rows=’,irows,’ cols=’,icols end program demo_xterm_get_geometry
John S. Urban
Nemo Release 3.1 | xterm_get_geometry (3) | February 23, 2025 |