From 07f71b84df4f4efa58b1c13768e19dff244801f3 Mon Sep 17 00:00:00 2001 From: Levon Gevorgyan Date: Tue, 28 Jan 2025 16:41:23 -0600 Subject: [PATCH] don't use separate lines/col, just use BASH built ins --- scripts/estimate_fg.sh | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/scripts/estimate_fg.sh b/scripts/estimate_fg.sh index f8a964f..fbd1805 100755 --- a/scripts/estimate_fg.sh +++ b/scripts/estimate_fg.sh @@ -239,14 +239,9 @@ plot() { echo -e "$GRAIN\t$AVG_BITRATE" >> "$PLOT" done - # set terminal size - TERMINAL="$(tty)" - COLUMNS=$(stty -a <"$TERMINAL" | grep -Po '(?<=columns )\d+') - ROWS=$(stty -a <"$TERMINAL" | grep -Po '(?<=rows )\d+') - # plot data gnuplot -p -e " \ - set terminal dumb size $COLUMNS, $ROWS; \ + set terminal dumb size $COLUMNS, $LINES; \ set autoscale; \ set style line 1 \ linecolor rgb '#0060ad' \ @@ -262,4 +257,4 @@ get_avg_bitrate "$INPUT" segment_video encode_segments test "$PLOT" == 'true' && test -f "$GRAIN_LOG" && \ - { plot ; } \ No newline at end of file + { plot ; }