diff --git a/docs/graphics-protocol.rst b/docs/graphics-protocol.rst index 7ba2127d6..c82a8f3f7 100644 --- a/docs/graphics-protocol.rst +++ b/docs/graphics-protocol.rst @@ -132,19 +132,24 @@ code to demonstrate its use } -.. tab:: Bash +.. tab:: POSIX sh .. code-block:: sh - - #!/bin/bash - + #!/bin/sh # This uses the kitten standalone binary from kitty to get the pixel sizes # since we can't do IOCTLs directly. Fortunately, kitten is a static exe # pre-built for every Unix like OS under the sun. - builtin read -r rows cols < <(command stty size) - IFS=x builtin read -r width height < <(command kitten icat --print-window-size); builtin unset IFS - builtin echo "number of rows: $rows number of columns: $cols screen width: $width screen height: $height" + read rows cols <