Skip to content

Instantly share code, notes, and snippets.

@MrHighVoltage
Last active December 9, 2025 03:51
Show Gist options
  • Select an option

  • Save MrHighVoltage/78ca58218a569d253433fd4be883c6c3 to your computer and use it in GitHub Desktop.

Select an option

Save MrHighVoltage/78ca58218a569d253433fd4be883c6c3 to your computer and use it in GitHub Desktop.
{
"env": {
"PATH": "$(PATH):$(HOME)\/.local\/bin"
},
"apps": [
{
"name": "720p60 Desktop",
"prep-cmd": [
{
"do": "bash \/home\/georg\/.config\/sunshine\/prepare_steam.sh",
"undo": "bash \/home\/georg\/.config\/sunshine\/finalize_steam.sh"
},
{
"do": "kscreen-doctor output.HDMI-A-1.mode.1280x720@60 output.HDMI-A-1.hdr.disable output.HDMI-A-1.enable output.DP-1.disable output.DP-2.disable",
"undo": "kscreen-doctor output.DP-1.enable output.DP-2.enable output.HDMI-A-1.disable"
}
]
},
{
"name": "1080p60 Desktop",
"prep-cmd": [
{
"do": "bash \/home\/georg\/.config\/sunshine\/prepare_steam.sh",
"undo": "bash \/home\/georg\/.config\/sunshine\/finalize_steam.sh"
},
{
"do": "kscreen-doctor output.HDMI-A-1.mode.1920x1080@60 output.HDMI-A-1.hdr.disable output.HDMI-A-1.enable output.DP-1.disable output.DP-2.disable ",
"undo": "kscreen-doctor output.DP-1.enable output.DP-2.enable output.HDMI-A-1.disable"
}
]
},
{
"name": "1080p120 Desktop",
"prep-cmd": [
{
"do": "bash \/home\/georg\/.config\/sunshine\/prepare_steam.sh",
"undo": "bash \/home\/georg\/.config\/sunshine\/finalize_steam.sh"
},
{
"do": "kscreen-doctor output.HDMI-A-1.mode.1920x1080@120 output.HDMI-A-1.hdr.disable output.HDMI-A-1.enable output.DP-1.disable output.DP-2.disable ",
"undo": "kscreen-doctor output.DP-1.enable output.DP-2.enable output.HDMI-A-1.disable"
}
]
},
{
"name": "1080p120 HDR Desktop",
"prep-cmd": [
{
"do": "bash \/home\/georg\/.config\/sunshine\/prepare_steam.sh",
"undo": "bash \/home\/georg\/.config\/sunshine\/finalize_steam.sh"
},
{
"do": "kscreen-doctor output.HDMI-A-1.mode.1920x1080@120 output.HDMI-A-1.hdr.enable output.HDMI-A-1.enable output.DP-1.disable output.DP-2.disable ",
"undo": "kscreen-doctor output.DP-1.enable output.DP-2.enable output.HDMI-A-1.disable"
}
]
},
{
"name": "4k60 HDR Desktop",
"output": "",
"cmd": "",
"prep-cmd": [
{
"do": "bash \/home\/georg\/.config\/sunshine\/prepare_steam.sh",
"undo": "bash \/home\/georg\/.config\/sunshine\/finalize_steam.sh"
},
{
"do": "kscreen-doctor output.HDMI-A-1.mode.3840x2160@60 output.HDMI-A-1.hdr.enable output.HDMI-A-1.enable output.DP-1.disable output.DP-2.disable",
"undo": "kscreen-doctor output.DP-1.enable output.DP-2.enable output.HDMI-A-1.disable"
}
],
"image-path": ""
},
{
"name": "4k120 HDR Desktop",
"output": "",
"cmd": "",
"prep-cmd": [
{
"do": "bash \/home\/georg\/.config\/sunshine\/prepare_steam.sh",
"undo": "bash \/home\/georg\/.config\/sunshine\/finalize_steam.sh"
},
{
"do": "kscreen-doctor output.HDMI-A-1.mode.3840x2160@120 output.HDMI-A-1.hdr.enable output.HDMI-A-1.enable output.DP-1.disable output.DP-2.disable",
"undo": "kscreen-doctor output.DP-1.enable output.DP-2.enable output.HDMI-A-1.disable"
}
],
"image-path": ""
},
{
"name": "1440p60 Desktop",
"output": "",
"cmd": "",
"image-path": "",
"prep-cmd": [
{
"do": "bash \/home\/georg\/.config\/sunshine\/prepare_steam.sh",
"undo": "bash \/home\/georg\/.config\/sunshine\/finalize_steam.sh"
},
{
"do": "kscreen-doctoroutput.HDMI-A-1.mode.2560x1440@60 output.HDMI-A-1.hdr.disable output.HDMI-A-1.enable output.DP-1.disable output.DP-2.disable ",
"undo": "kscreen-doctor output.DP-1.enable output.DP-2.enable output.HDMI-A-1.disable"
}
]
},
{
"name": "1440p60 HDR Desktop",
"output": "",
"cmd": "",
"image-path": "",
"prep-cmd": [
{
"do": "bash \/home\/georg\/.config\/sunshine\/prepare_steam.sh",
"undo": "bash \/home\/georg\/.config\/sunshine\/finalize_steam.sh"
},
{
"do": "kscreen-doctoroutput.HDMI-A-1.mode.2560x1440@60 output.HDMI-A-1.hdr.enable output.HDMI-A-1.enable output.DP-1.disable output.DP-2.disable ",
"undo": "kscreen-doctor output.DP-1.enable output.DP-2.enable output.HDMI-A-1.disable"
}
]
},
{
"name": "1920x1200 Desktop",
"output": "",
"cmd": "",
"prep-cmd": [
{
"do": "bash \/home\/georg\/.config\/sunshine\/prepare_steam.sh",
"undo": "bash \/home\/georg\/.config\/sunshine\/finalize_steam.sh"
},
{
"do": "kscreen-doctor output.HDMI-A-1.mode.1920x1200@60 output.HDMI-A-1.hdr.disable output.HDMI-A-1.enable output.DP-1.disable output.DP-2.disable",
"undo": "kscreen-doctor output.DP-1.enable output.DP-2.enable output.HDMI-A-1.disable"
}
],
"image-path": ""
}
]
}
{
"env": {
"PATH": "$(PATH):$(HOME)\/.local\/bin"
},
"apps": [
{
"name": "FullHD Desktop",
"prep-cmd": [
{
"do": "bash \/home\/georg\/.config\/sunshine\/prepare_steam.sh",
"undo": "bash \/home\/georg\/.config\/sunshine\/finalize_steam.sh"
},
{
"do": "xrandr --output HDMI-A-0 --mode 1920x1080 --rate 60 --primary --output DisplayPort-0 --off --output DisplayPort-1 --off",
"undo": "xrandr --output HDMI-A-0 --off --output DisplayPort-0 --auto --primary --output DisplayPort-1 --auto --left-of DisplayPort-0"
}
]
},
{
"name": "OP6 Desktop",
"output": "",
"cmd": "",
"prep-cmd": [
{
"do": "bash \/home\/georg\/.config\/sunshine\/prepare_steam.sh",
"undo": "bash \/home\/georg\/.config\/sunshine\/finalize_steam.sh"
},
{
"do": "xrandr --newmode 2264x1080_60.00 203.50 2264 2408 2648 3032 1080 1083 1093 1120 -hsync +vsync",
"undo": "xrandr --rmmode 2264x1080_60.00"
},
{
"do": "xrandr --addmode HDMI-A-0 2264x1080_60.00",
"undo": "xrandr --delmode HDMI-A-0 2264x1080_60.00"
},
{
"do": "xrandr --output HDMI-A-0 --mode 2264x1080_60.00 --primary --output DisplayPort-0 --off --output DisplayPort-1 --off",
"undo": "xrandr --output HDMI-A-0 --off --output DisplayPort-0 --auto --primary --output DisplayPort-1 --auto --left-of DisplayPort-0"
}
],
"image-path": ""
},
{
"name": "S23U Low native 120 Desktop",
"output": "",
"cmd": "",
"prep-cmd": [
{
"do": "bash \/home\/georg\/.config\/sunshine\/prepare_steam.sh",
"undo": "bash \/home\/georg\/.config\/sunshine\/finalize_steam.sh"
},
{
"do": "xrandr --newmode 1544x720_120.00 195.25 1544 1664 1824 2104 720 723 733 775 -hsync +vsync",
"undo": "xrandr --rmmode 1544x720_120.00"
},
{
"do": "xrandr --addmode HDMI-A-0 1544x720_120.00",
"undo": "xrandr --delmode HDMI-A-0 1544x720_120.00"
},
{
"do": "xrandr --output HDMI-A-0 --mode 1544x720_120.00 --primary --output DisplayPort-0 --off --output DisplayPort-1 --off",
"undo": "xrandr --output HDMI-A-0 --off --output DisplayPort-0 --auto --primary --output DisplayPort-1 --auto --left-of DisplayPort-0"
}
],
"image-path": ""
},
{
"name": "S23U mid native 60 Desktop",
"output": "",
"cmd": "",
"prep-cmd": [
{
"do": "bash \/home\/georg\/.config\/sunshine\/prepare_steam.sh",
"undo": "bash \/home\/georg\/.config\/sunshine\/finalize_steam.sh"
},
{
"do": "xrandr --newmode 2320x1080_60.00 208.50 2320 2472 2712 3104 1080 1083 1093 1120 -hsync +vsync",
"undo": "xrandr --rmmode 2320x1080_60.00"
},
{
"do": "xrandr --addmode HDMI-A-0 2320x1080_60.00",
"undo": "xrandr --delmode HDMI-A-0 2320x1080_60.00"
},
{
"do": "xrandr --output HDMI-A-0 --mode 2320x1080_60.00 --primary --output DisplayPort-0 --off --output DisplayPort-1 --off",
"undo": "xrandr --output HDMI-A-0 --off --output DisplayPort-0 --auto --primary --output DisplayPort-1 --auto --left-of DisplayPort-0"
}
],
"image-path": ""
},
{
"name": "4k60 Desktop",
"output": "",
"cmd": "",
"prep-cmd": [
{
"do": "bash \/home\/georg\/.config\/sunshine\/prepare_steam.sh",
"undo": "bash \/home\/georg\/.config\/sunshine\/finalize_steam.sh"
},
{
"do": "xrandr --output HDMI-A-0 --mode 3840x2160 --rate 60 --primary --output DisplayPort-0 --off --output DisplayPort-1 --off",
"undo": "xrandr --output HDMI-A-0 --off --output DisplayPort-0 --auto --primary --output DisplayPort-1 --auto --left-of DisplayPort-0"
}
],
"image-path": ""
},
{
"name": "1440p60 Desktop",
"output": "",
"cmd": "",
"image-path": "",
"prep-cmd": [
{
"do": "bash \/home\/georg\/.config\/sunshine\/prepare_steam.sh",
"undo": "bash \/home\/georg\/.config\/sunshine\/finalize_steam.sh"
},
{
"do": "xrandr --newmode 2560x1440_60.00 312.25 2560 2752 3024 3488 1440 1443 1448 1493 -hsync +vsync",
"undo": "xrandr --rmmode 2560x1440_60.00"
},
{
"do": "xrandr --addmode HDMI-A-0 2560x1440_60.00",
"undo": "xrandr --delmode HDMI-A-0 2560x1440_60.00"
},
{
"do": "xrandr --output HDMI-A-0 --mode 2560x1440_60.00 --primary --output DisplayPort-0 --off --output DisplayPort-1 --off",
"undo": "xrandr --output HDMI-A-0 --off --output DisplayPort-0 --auto --primary --output DisplayPort-1 --auto --left-of DisplayPort-0"
}
]
},
{
"name": "iPad Desktop",
"output": "",
"cmd": "",
"prep-cmd": [
{
"do": "bash \/home\/georg\/.config\/sunshine\/prepare_steam.sh",
"undo": "bash \/home\/georg\/.config\/sunshine\/finalize_steam.sh"
},
{
"do": "xrandr --newmode 2360x1640_60.00 328.50 2360 2536 2792 3224 1640 1643 1653 1700 -hsync +vsync",
"undo": "xrandr --rmmode 2360x1640_60.00"
},
{
"do": "xrandr --addmode HDMI-A-0 2360x1640_60.00",
"undo": "xrandr --delmode HDMI-A-0 2360x1640_60.00"
},
{
"do": "xrandr --output HDMI-A-0 --mode 2360x1640_60.00 --primary --output DisplayPort-0 --off --output DisplayPort-1 --off",
"undo": "xrandr --output HDMI-A-0 --off --output DisplayPort-0 --auto --primary --output DisplayPort-1 --auto --left-of DisplayPort-0"
}
],
"image-path": ""
},
{
"name": "4k120 Desktop",
"output": "",
"cmd": "",
"prep-cmd": [
{
"do": "bash \/home\/georg\/.config\/sunshine\/prepare_steam.sh",
"undo": "bash \/home\/georg\/.config\/sunshine\/finalize_steam.sh"
},
{
"do": "xrandr --output HDMI-A-0 --mode 3840x2160 --rate 120 --primary --output DisplayPort-0 --off --output DisplayPort-1 --off",
"undo": "xrandr --output HDMI-A-0 --off --output DisplayPort-0 --auto --primary --output DisplayPort-1 --auto --left-of DisplayPort-0"
}
],
"image-path": ""
},
{
"name": "1920x1200 Desktop",
"output": "",
"cmd": "",
"prep-cmd": [
{
"do": "bash \/home\/georg\/.config\/sunshine\/prepare_steam.sh",
"undo": "bash \/home\/georg\/.config\/sunshine\/finalize_steam.sh"
},
{
"do": "xrandr --output HDMI-A-0 --mode 1920x1200 --rate 60 --primary --output DisplayPort-0 --off --output DisplayPort-1 --off",
"undo": "xrandr --output HDMI-A-0 --off --output DisplayPort-0 --auto --primary --output DisplayPort-1 --auto --left-of DisplayPort-0"
}
],
"image-path": ""
}
]
}
#!/bin/bash
loginctl lock-session $XDG_SESSION_ID
sleep 1
qdbus org.kde.KWin /KWin setCurrentDesktop 1
exit 0
#!/bin/bash
qdbus org.kde.KWin /KWin setCurrentDesktop 2
sleep 1
loginctl unlock-session $XDG_SESSION_ID
exit 0
@VXsz
Copy link

VXsz commented Sep 6, 2025

An explanation would be better honestly. I had to figure it a lot of stuff manually with how to use these.

@trivarialthea
Copy link

@MrHighVoltage , mind providing some kind of a usage guide for those scripts?

@fine77
Copy link

fine77 commented Nov 23, 2025

@MrHighVoltage , mind providing some kind of a usage guide for those scripts?

maybe you should keep in mind, that this are all sample settings for an application with different resolutions who's stored in $HOME/.config/sunshine/apps.json who is generated if you set the values in the admin page / applications.
My example for Forza Horizon 5 looks the following:

    { 
        "allow-client-commands": true,
        "auto-detach": true,
        "cmd": "",
        "detached": [
            "setsid steam steam://rungameid/1551360"
        ],
        "elevated": false,
        "exclude-global-prep-cmd": false,
        "exclude-global-state-cmd": false,
        "exit-timeout": 5,
        "gamepad": "",
        "image-path": "/home/manager/.config/sunshine/covers/igdb_141503.png",
        "name": "Forza Horizon 5",
        "output": "",
        "per-client-app-identity": false,
        "prep-cmd": [
            {
                "do": "bash \\/home\\/manager\\/.config\\/sunshine\\/prepare_steam.sh",
                "undo": "bash \\/home\\/manager\\/.config\\/sunshine\\/finalize_steam.sh"
            },
            {
                "do": "kscreen-doctor output.HDMI-A-2.mode.3840x2160@30 output.HDMI-A-2.hdr.enable output.HDMI-A-2.enable output.HDMI-A-1.disable",
                "undo": "kscreen-doctor output.HDMI-A-1.enable output.HDMI-A-2.disable"
            }
        ],
        "scale-factor": 100,
        "state-cmd": [],
        "terminate-on-pause": false,
        "use-app-identity": false,
        "uuid": "CE4E387C-C607-830F-B91E-4D701A8A5B66",
        "virtual-display": false,
        "wait-all": true
    },

can you see the do's and undo's @ prep-cmd? thats what the nice guy who posted this wanted to show.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment