Setcustomres: set a custom resolution to a screen with a single command

setcustomres, set a custom resolution to a screen with a single command.

Description: Set custom resolution to a display using xrandr
Usage: setcustomres OPTIONS
Version: 2.1

-w | --width            Mandatory: Width of resolution
-h | --height           Mandatory: Hight of resolution
-o | --output           Mandatory: Display output
-r | --refresh-rate     Custom refresh rate (Default 60Hz)
-p | --param            xrandr parameters, wrap with double quotes
--help                  Print this help message



          ---Usage Examples---

# This sets a custom resolution to HDMI-1
~$ setcustomres -w 1920 -h 1080 -o HDMI-1

# This sets a custom resolution to DP-1 and maps it to the right of VGA-1
~$ setcustomres --width 1366 --height 768 --output DP-1 --param "--right-of VGA-1"

# This sets a custom resolution to VGA-2 and makes it the primary screen
~$ setcustomres -w 1680 -h 1050 -o VGA-2 -p "--primary"

# This sets a custom resolution to HDMI-1 with a refresh rate of 120Hz
~$ setcustomres -w 1600 -h 900 -o HDMI-1 -r 120

More info: GitHub - YoungFellow-le/setcustomres: A tool that summarizes the process of setting a custom resolution to a monitor using xrandr.

Can be installed from the AUR:

yay -S setcustomres
1 Like

Why has this been moved to a new topic @Yochanan?

Because it’s your own software you’re self-promoting. :wink:

Oh, okay

I hope this works on my rog ally handheld as trying to set 960x540 won’t work with xrandr

The script utilizes xrandr, so unless there’s something wrong with your commands it’s unlikely that setcustomres would be any different.

But wlr-randr should work very similarly but for wayland.
If either of you wants that.

Similar to setcustomres or xrandr?

I’m guessing xrandr:

https://sr.ht/~emersion/wlr-randr/

1 Like