From e6339ae552c9229c09e4b50e980a73f395455399 Mon Sep 17 00:00:00 2001 From: Klesh Wong Date: Tue, 17 Nov 2020 19:20:02 +0800 Subject: [PATCH] [bugfix] prefer width / height default value --- bin/sc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/sc b/bin/sc index bb1f6ec..74dfe1f 100755 --- a/bin/sc +++ b/bin/sc @@ -31,8 +31,8 @@ end set --append subcmds prepare set prepare_help '[w=1920] [h=1080]' 'create virtual monotors if physical size is higher than specified' function prepare -a pw ph - set -q pw || set pw 1920 - set -q ph || set pw 1080 + test -z $pw && set pw 1920 + test -z $ph && set ph 1080 set moninfo (xrandr | grep ' primary') if not set whxy (string match -r '([0-9]+)x([0-9]+)\+([0-9]+)\+([0-9]+)' $moninfo)