From e0fcf65c9e7ab50d1b524fb9a72d14724502a911 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Mon, 2 Nov 2020 16:12:14 +0100 Subject: linkview update --- .local/bin/mpview | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to '.local/bin/mpview') diff --git a/.local/bin/mpview b/.local/bin/mpview index a66a75b..65fe97e 100755 --- a/.local/bin/mpview +++ b/.local/bin/mpview @@ -3,6 +3,7 @@ use strict; use warnings; use Scalar::Util qw(looks_like_number); +use Term::ReadKey; use Term::ANSIColor; sub get_size @@ -21,8 +22,18 @@ sub get_size "6) 1080\n" . "\n" . "> "; - $answer = ; - if (!looks_like_number($answer) || $answer == 0 || $answer == 1 || $answer > 6) { + open(TTY, " 6 + ) { $size = 0; } elsif ($answer == 2) { -- cgit v1.2.3