Control your monitors settings via software

Did you know that you can control monitor settings on your terminal from Linux?
How to simplify and automate certain operations like switching inputs or changing brightness.

I have three monitors attached to my personal Linux laptop via display ports, and one of them is also connected to my work MacBook via the HDMI port.

Every morning before starting to work, I would click the buttons on the monitor to switch the input to HDMI, and the same would happen in the evening when I wanted to work on my projects.

It doesn’t seem like much, but as a person striving to automate all I can, I concluded that there should have been a better way to do this.

A quick online search introduced me to dccutil

ddcutil is a Linux program for managing monitor settings, such as brightness, color levels, and input source. Generally speaking, any setting that can be changed by pressing buttons on the monitor can be modified by ddcutil.

I then created two aliases:

alias d1dp='sudo ddcutil --display 1 setvcp 60 0x10'
alias d1hdmi='sudo ddcutil --display 1 setvcp 60 0x11'

Now every day starts with a d1hdmi and ends with a d1dp.