Last active
October 24, 2020 22:03
-
-
Save gbzarelli/2dd9256b77147b1e9aed191d86fcd0b6 to your computer and use it in GitHub Desktop.
Monitor Sheets
This file contains 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
#PRIMARY DISPLAY = EXTENDED DISPLAY CONNECTED TO THE HDMI PORT | |
#SECONDARY DISPLAY = BUILT IN DISPLAY | |
PRIMARY_DISPLAY=$(xrandr | grep -w HDMI | awk -F'[ \+]' '{print $1}') | |
SECONDARY_DISPLAY=$(xrandr | grep -w eDP | awk -F'[ \+]' '{print $1}') | |
MODE1408=$(cvt 1408 792 60 | sed -n '2p' | awk '{gsub(/Modeline /,"")}1') | |
MODE1440=$(cvt 1440 810 60 | sed -n '2p' | awk '{gsub(/Modeline /,"")}1') | |
MODE1536=$(cvt 1536 864 60 | sed -n '2p' | awk '{gsub(/Modeline /,"")}1') | |
MODE1600=$(cvt 1600 900 60 | sed -n '2p' | awk '{gsub(/Modeline /,"")}1') | |
MODE1920=$(cvt 1920 1080 60 | sed -n '2p' | awk '{gsub(/Modeline /,"")}1') | |
eval "xrandr --output ${SECONDARY_DISPLAY} --newmode ${MODE1408}" | |
eval "xrandr --addmode ${SECONDARY_DISPLAY} 1408x792_60.00" | |
eval "xrandr --output ${SECONDARY_DISPLAY} --newmode ${MODE1440}" | |
eval "xrandr --addmode ${SECONDARY_DISPLAY} 1440x810_60.00" | |
eval "xrandr --output ${SECONDARY_DISPLAY} --newmode ${MODE1536}" | |
eval "xrandr --addmode ${SECONDARY_DISPLAY} 1536x864_60.00" | |
eval "xrandr --output ${SECONDARY_DISPLAY} --newmode ${MODE1600}" | |
eval "xrandr --addmode ${SECONDARY_DISPLAY} 1600x900_60.00" | |
eval "xrandr --output ${SECONDARY_DISPLAY} --newmode ${MODE1920}" | |
eval "xrandr --addmode ${SECONDARY_DISPLAY} 1920x1080_60.00" | |
# SETTING THE EXTENDED DISPLAY AS PRIMARY, RIGHT OF THE IN BUILT DISPLAY | |
if [ "$PRIMARY_DISPLAY" != "" ]; then | |
eval "xrandr --output ${PRIMARY_DISPLAY} --primary --right-of ${SECONDARY_DISPLAY}" | |
fi |
This file contains 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
$ gsettings set org.gnome.desktop.interface text-scaling-factor 0.8 | |
( default is 1.2 ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment