diff options
| author | 2025-05-28 14:24:58 -0400 | |
|---|---|---|
| committer | 2025-05-28 14:24:58 -0400 | |
| commit | a28487fe6fbac72c7b1a752acab42dcc6ab46476 (patch) | |
| tree | c3b1b9b751dd5e96b4afc835decf14ce38fd35f8 /scripts/term-font-size | |
| parent | 75ad6c3fcad1f19c4f4f5c345fbb43ce80d9c461 (diff) | |
| download | dotfiles-a28487fe6fbac72c7b1a752acab42dcc6ab46476.tar.gz dotfiles-a28487fe6fbac72c7b1a752acab42dcc6ab46476.tar.bz2 dotfiles-a28487fe6fbac72c7b1a752acab42dcc6ab46476.zip | |
Post server fs corruption
Diffstat (limited to 'scripts/term-font-size')
| -rwxr-xr-x | scripts/term-font-size | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/scripts/term-font-size b/scripts/term-font-size deleted file mode 100755 index 0637b12..0000000 --- a/scripts/term-font-size +++ /dev/null @@ -1,20 +0,0 @@ -#! /usr/bin/env python3 - -import array -import fcntl -import termios -import os - -def get_term_res(): - buf = array.array('H', [0, 0, 0, 0]) - fcntl.ioctl(1, termios.TIOCGWINSZ, buf) - return buf[2], buf[3] - -def get_term_dimensions(): - return os.get_terminal_size() - -x_px, y_px = get_term_res() -size = get_term_dimensions() -x_cell, y_cell = size.columns, size.lines - -print('width : {}, height: {}'.format(x_px / float(x_cell), y_px / float(y_cell))) |