Creating custom resolutions is quite tedious. Surely I can’t be the first person to desire a tool which just does it for me.

Enter x, y, rate and done. That’s what I want. Quick feedback cycles. No running 3 commands manually specifying names or whatever; I don’t care how it’s called, I don’t want to have to specify.

Does it exist? Preferably CLI or TUI but I could live with GUI.

  • vvv
    link
    fedilink
    arrow-up
    9
    ·
    9 months ago

    I have a stupid little script for this:

    #!/bin/sh
    
    setres() {
      output=$1
      width=$2
      height=$3
    
      xrandr --output $output --brightness 0 --auto
      xrandr --delmode $output better
      xrandr --rmmode better
    
      xrandr --newmode better $(cvt $width $height | tail -n1 | cut -d'"' -f3)
      xrandr --addmode $output better
      xrandr --output $output --brightness 1 --mode better 
    }
    
    setres "$@"
    
    
      • vvv
        link
        fedilink
        arrow-up
        5
        ·
        9 months ago

        Eh, though you’re right, it’s a pattern I like a lot: define your “main” at the top, put all the supporting functions below, and call main at the end.

        These days I’ve got a little bash task runner framework that I use for little scripts like this.

      • vvv
        link
        fedilink
        arrow-up
        2
        ·
        9 months ago

        I didn’t like the random blinking and glitchiness the screen did as it changed resolutions. Most OSes, if you notice, do a little fade out and in but I was too lazy to make it gradual.