Skip to content

Commit

Permalink
set-resolution script added
Browse files Browse the repository at this point in the history
  • Loading branch information
HosseinZaredar committed Feb 22, 2020
1 parent 3c9481e commit c258dd2
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions set-resolution.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash

# write your Screen Resolution down below and execute this script.
# you can also put this script in Startup Applications so you woudln't have to manually run it after every reboot.

# PUT YOUR Screen Resolution HERE:
RES="1920 1080"

# ------------------------------------------------------
resDetails=`cvt $RES 60 | sed -n 2p | cut -d' ' -f2-`
resAndFreq=`echo $resDetails | cut -d'"' -f2`
res=`echo $resAndFreq | cut -d'_' -f1`
screen=`xrandr | sed -n 2p | cut -d' ' -f1`
xrandr --newmode $resDetails 2> /dev/null
xrandr --addmode $screen \"$resAndFreq\"
xrandr -s "$res"
# ------------------------------------------------------

0 comments on commit c258dd2

Please sign in to comment.