From b65956b1360f1e03ea15c26a53a6609e2ed50a17 Mon Sep 17 00:00:00 2001 From: Sam Bowlby Date: Mon, 23 Aug 2021 15:31:06 +0400 Subject: [PATCH] fix detection of screen dimensions Signed-off-by: Stacy Harper --- configs/default_hooks/lisgdstart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/configs/default_hooks/lisgdstart b/configs/default_hooks/lisgdstart index 47f7cd7..5682661 100644 --- a/configs/default_hooks/lisgdstart +++ b/configs/default_hooks/lisgdstart @@ -26,9 +26,9 @@ case "$(sxmo_wm.sh)" in orientation="$((transform / 90))" ;; dwm) - output="$(xrandr | grep DSI-1 | sed "s|.* \(\d\+\)x\(\d\+\)+.*|\1 \2|")" - height="$(printf %s "$output" | cut -d" " -f2)" - width="$(printf %s "$output" | cut -d" " -f1)" + output="$(xrandr | grep DSI-1 | cut -d' ' -f4)" + height="$(printf %s "$output" | cut -d'x' -f2 | cut -d'+' -f1)" + width="$(printf %s "$output" | cut -d'x' -f1)" case "$(xrandr | grep DSI-1 | cut -d' ' -f 5)" in right) orientation=1;; left) orientation=3;;