Adding if-else statement to check to laptop/desktop resolution.

This commit is contained in:
Derek Taylor
2023-08-21 21:15:27 -05:00
parent cd06b1fa87
commit e182f7d2b0

View File

@@ -4,8 +4,11 @@ COLORSCHEME=DoomOne
if [[ $(systemd-detect-virt) = "none" ]]; then if [[ $(systemd-detect-virt) = "none" ]]; then
echo "Not running in a Virtual Machine"; 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."; xrandr -s 1920x1080 || echo "Cannot set 1920x1080 resolution.";
else echo "Could not set a resolution."
fi fi