From e182f7d2b09b4693a32e0cb2a57f24026088dc6f Mon Sep 17 00:00:00 2001 From: Derek Taylor Date: Mon, 21 Aug 2023 21:15:27 -0500 Subject: [PATCH] Adding if-else statement to check to laptop/desktop resolution. --- .config/qtile/autostart.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.config/qtile/autostart.sh b/.config/qtile/autostart.sh index ac416b0..728db6d 100755 --- a/.config/qtile/autostart.sh +++ b/.config/qtile/autostart.sh @@ -4,8 +4,11 @@ COLORSCHEME=DoomOne if [[ $(systemd-detect-virt) = "none" ]]; then echo "Not running in a Virtual Machine"; -else +elif xrandr | grep "1366x768"; then + xrandr -s 1366x768 || echo "Cannot set 1366x768 resolution."; +elif xrandr | grep "1920x1080"; then xrandr -s 1920x1080 || echo "Cannot set 1920x1080 resolution."; +else echo "Could not set a resolution." fi