September 23, 2024

Using Terminal To Change Screen Resolutions

Quickly change your screen to 1080p.

This is for the nerds, but in Terminal I have added some aliases to my ~/.bashrc file to make it easier to change screen resolutions:

// add to the bottom
alias mouse1="xinput set-prop 10 \"libinput Accel Speed\" 0"
alias mouse2="xinput set-prop 10 \"libinput Accel Speed\" -0.5"
alias 1080p="xrandr --output eDP-1 --mode 1920x1080 && mouse2"
alias screenreset="xrandr --output eDP-1 --auto && mouse1"

Reset Terminal so it reloads the config:

$ source ~/.bashrc

This is handy for playing old games by setting my screen quickly to 1080p. Not all my games need it, but some of them do.

// change
$ 1080p

// change back
$ screenreset

Many of the old games weren’t designed for 4k resolutions and this resolves many of those issues. It’s also helpful for newer games bc the lower resolution improves video performance.

These commands also change the mouse speed to be proportional to the new resolution.