aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xxres6
1 files changed, 1 insertions, 5 deletions
diff --git a/xres b/xres
index 2a385cf..5495b6c 100755
--- a/xres
+++ b/xres
@@ -25,11 +25,7 @@ MODELINE="`cvt $X $Y | grep -v '^#' | sed -e 's/^Modeline //'`"
INTERFACE="`xrandr | grep " connected" | cut -d ' ' -f 1 | head`"
NAME="`echo $MODELINE | cut -d ' ' -f 1 | sed -e 's/"//g'`"
-# Add modeline
-if ! xrandr | grep -q -e "^ $NAME"; then
- xrandr --newmode $MODELINE
-fi
-
# Apply
+xrandr --newmode $MODELINE &> /dev/null
xrandr --addmode $INTERFACE $NAME
xrandr --output $INTERFACE --mode $NAME