Unable to set a Default Resolution in i3

I have a 4k monitor screen on laptop and the default configuration makes the icons very small to work with. I changed the resolution to 1920x1080 using xrandr. I got to know this step can be automated creating monitor.sh using arandr. I followed the steps and uncommented the line in the config file as well. But this is not working. Whenever i reboot/logout the machine i need to manually run the monitor.sh to correct the resolution. Can you guys please help me?

Hello there.
firstly you should install a package called autorandr
sudo pacman -S autorandr

then make sure the layout you want is set correctly and use
autorandr save name-for-layout followed by autorandr -d name-for-layout

then in your ~/.config/i3/config file add the following line to the autostart section:

exec --no-startup-id autorandr -c

that should automatically load and set the layout/screen configuration if you have only the one saved with autorandr :slight_smile:

1 Like