mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-09 08:21:01 -04:00
scripts: generate-alt-random-writes: add command line arguments for cols/rows
This commit is contained in:
parent
cc850ed012
commit
66527b39b1
1 changed files with 7 additions and 0 deletions
|
|
@ -18,6 +18,8 @@ def main():
|
||||||
parser = argparse.ArgumentParser()
|
parser = argparse.ArgumentParser()
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'out', type=argparse.FileType(mode='w'), nargs='?', help='name of output file')
|
'out', type=argparse.FileType(mode='w'), nargs='?', help='name of output file')
|
||||||
|
parser.add_argument('--cols', type=int)
|
||||||
|
parser.add_argument('--rows', type=int)
|
||||||
parser.add_argument('--colors-regular', action='store_true')
|
parser.add_argument('--colors-regular', action='store_true')
|
||||||
parser.add_argument('--colors-bright', action='store_true')
|
parser.add_argument('--colors-bright', action='store_true')
|
||||||
parser.add_argument('--colors-rgb', action='store_true')
|
parser.add_argument('--colors-rgb', action='store_true')
|
||||||
|
|
@ -33,6 +35,11 @@ def main():
|
||||||
termios.TIOCGWINSZ,
|
termios.TIOCGWINSZ,
|
||||||
struct.pack('HHHH', 0, 0, 0, 0)))
|
struct.pack('HHHH', 0, 0, 0, 0)))
|
||||||
|
|
||||||
|
if opts.rows is not None:
|
||||||
|
lines = opts.rows
|
||||||
|
if opts.cols is not None:
|
||||||
|
cols = opts.cols
|
||||||
|
|
||||||
# Number of characters to write to screen
|
# Number of characters to write to screen
|
||||||
count = 256 * 1024**1
|
count = 256 * 1024**1
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue