Created
February 27, 2019 02:34
-
-
Save zerosoul13/f952aa44ec07b55a1e4875920851fec1 to your computer and use it in GitHub Desktop.
xrand sets resolution at i3 startup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Get connected monitor | |
OUTPUT=$( xrandr --query | grep " connected" | cut -d" " -f1) | |
# Get resolution | |
MODE=$(xrandr --query | grep " connected" | cut -d" " -f1-4 | sed s/+0//g | awk '{print $4}') | |
# Set output and mode and enjoy | |
xrandr --output $OUTPUT --mode $MODE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment