docs: use github admonition styles (#4263)
This commit is contained in:
parent
cadc89aa14
commit
9f6c832583
9 changed files with 223 additions and 157 deletions
|
|
@ -2,10 +2,12 @@
|
|||
Since not all applications behave the same, we decided to create some examples to help you get started adding games
|
||||
and applications to Sunshine.
|
||||
|
||||
@attention{Throughout these examples, any fields not shown are left blank. You can enhance your experience by
|
||||
adding an image or a log file (via the `Output` field).}
|
||||
> [!TIP]
|
||||
> Throughout these examples, any fields not shown are left blank. You can enhance your experience by
|
||||
> adding an image or a log file (via the `Output` field).
|
||||
|
||||
@note{When a working directory is not specified, it defaults to the folder where the target application resides.}
|
||||
> [!WARNING]
|
||||
> When a working directory is not specified, it defaults to the folder where the target application resides.
|
||||
|
||||
|
||||
## Common Examples
|
||||
|
|
@ -18,8 +20,10 @@ adding an image or a log file (via the `Output` field).}
|
|||
| Image | @code{}desktop.png@endcode |
|
||||
|
||||
### Steam Big Picture
|
||||
@note{Steam is launched as a detached command because Steam starts with a process that self updates itself and the original
|
||||
process is killed.}
|
||||
|
||||
> [!NOTE]
|
||||
> Steam is launched as a detached command because Steam starts with a process that self updates itself and the original
|
||||
> process is killed.
|
||||
|
||||
@tabs{
|
||||
@tab{Linux | <!-- -->
|
||||
|
|
@ -49,7 +53,9 @@ process is killed.}
|
|||
}
|
||||
|
||||
### Epic Game Store game
|
||||
@note{Using URI method will be the most consistent between various games.}
|
||||
|
||||
> [!NOTE]
|
||||
> Using the URI method will be the most consistent between various games.
|
||||
|
||||
#### URI
|
||||
|
||||
|
|
@ -84,7 +90,9 @@ process is killed.}
|
|||
}
|
||||
|
||||
### Steam game
|
||||
@note{Using URI method will be the most consistent between various games.}
|
||||
|
||||
> [!NOTE]
|
||||
> Using the URI method will be the most consistent between various games.
|
||||
|
||||
#### URI
|
||||
|
||||
|
|
@ -169,49 +177,49 @@ process is killed.}
|
|||
| Do | @code{}sh -c "xrandr --output HDMI-1 --mode ${SUNSHINE_CLIENT_WIDTH}x${SUNSHINE_CLIENT_HEIGHT} --rate ${SUNSHINE_CLIENT_FPS}"@endcode |
|
||||
| Undo | @code{}xrandr --output HDMI-1 --mode 3840x2160 --rate 120@endcode |
|
||||
|
||||
@hint{The above only works if the xrandr mode already exists. You will need to create new modes to stream to macOS
|
||||
and iOS devices, since they use non-standard resolutions.
|
||||
|
||||
You can update the ``Do`` command to this:
|
||||
```bash
|
||||
bash -c "${HOME}/scripts/set-custom-res.sh \"${SUNSHINE_CLIENT_WIDTH}\" \"${SUNSHINE_CLIENT_HEIGHT}\" \"${SUNSHINE_CLIENT_FPS}\""
|
||||
```
|
||||
|
||||
The `set-custom-res.sh` will have this content:
|
||||
```bash
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# Get params and set any defaults
|
||||
width=${1:-1920}
|
||||
height=${2:-1080}
|
||||
refresh_rate=${3:-60}
|
||||
|
||||
# You may need to adjust the scaling differently so the UI/text isn't too small / big
|
||||
scale=${4:-0.55}
|
||||
|
||||
# Get the name of the active display
|
||||
display_output=$(xrandr | grep " connected" | awk '{ print $1 }')
|
||||
|
||||
# Get the modeline info from the 2nd row in the cvt output
|
||||
modeline=$(cvt ${width} ${height} ${refresh_rate} | awk 'FNR == 2')
|
||||
xrandr_mode_str=${modeline//Modeline \"*\" /}
|
||||
mode_alias="${width}x${height}"
|
||||
|
||||
echo "xrandr setting new mode ${mode_alias} ${xrandr_mode_str}"
|
||||
xrandr --newmode ${mode_alias} ${xrandr_mode_str}
|
||||
xrandr --addmode ${display_output} ${mode_alias}
|
||||
|
||||
# Reset scaling
|
||||
xrandr --output ${display_output} --scale 1
|
||||
|
||||
# Apply new xrandr mode
|
||||
xrandr --output ${display_output} --primary --mode ${mode_alias} --pos 0x0 --rotate normal --scale ${scale}
|
||||
|
||||
# Optional reset your wallpaper to fit to new resolution
|
||||
# xwallpaper --zoom /path/to/wallpaper.png
|
||||
```
|
||||
}
|
||||
> [!TIP]
|
||||
> The above only works if the xrandr mode already exists. You will need to create new modes to stream to macOS
|
||||
> and iOS devices, since they use non-standard resolutions.
|
||||
>
|
||||
> You can update the ``Do`` command to this:
|
||||
> ```bash
|
||||
> bash -c "${HOME}/scripts/set-custom-res.sh \"${SUNSHINE_CLIENT_WIDTH}\" \"${SUNSHINE_CLIENT_HEIGHT}\" \"${SUNSHINE_CLIENT_FPS}\""
|
||||
> ```
|
||||
>
|
||||
> The `set-custom-res.sh` will have this content:
|
||||
> ```bash
|
||||
> #!/bin/bash
|
||||
> set -e
|
||||
>
|
||||
> # Get params and set any defaults
|
||||
> width=${1:-1920}
|
||||
> height=${2:-1080}
|
||||
> refresh_rate=${3:-60}
|
||||
>
|
||||
> # You may need to adjust the scaling differently so the UI/text isn't too small / big
|
||||
> scale=${4:-0.55}
|
||||
>
|
||||
> # Get the name of the active display
|
||||
> display_output=$(xrandr | grep " connected" | awk '{ print $1 }')
|
||||
>
|
||||
> # Get the modeline info from the 2nd row in the cvt output
|
||||
> modeline=$(cvt ${width} ${height} ${refresh_rate} | awk 'FNR == 2')
|
||||
> xrandr_mode_str=${modeline//Modeline \"*\" /}
|
||||
> mode_alias="${width}x${height}"
|
||||
>
|
||||
> echo "xrandr setting new mode ${mode_alias} ${xrandr_mode_str}"
|
||||
> xrandr --newmode ${mode_alias} ${xrandr_mode_str}
|
||||
> xrandr --addmode ${display_output} ${mode_alias}
|
||||
>
|
||||
> # Reset scaling
|
||||
> xrandr --output ${display_output} --scale 1
|
||||
>
|
||||
> # Apply new xrandr mode
|
||||
> xrandr --output ${display_output} --primary --mode ${mode_alias} --pos 0x0 --rotate normal --scale ${scale}
|
||||
>
|
||||
> # Optional reset your wallpaper to fit to new resolution
|
||||
> # xwallpaper --zoom /path/to/wallpaper.png
|
||||
> ```
|
||||
|
||||
###### Wayland (wlroots, e.g. hyprland)
|
||||
|
||||
|
|
@ -220,7 +228,8 @@ xrandr --output ${display_output} --primary --mode ${mode_alias} --pos 0x0 --rot
|
|||
| Do | @code{}sh -c "wlr-xrandr --output HDMI-1 --mode \"${SUNSHINE_CLIENT_WIDTH}x${SUNSHINE_CLIENT_HEIGHT}@${SUNSHINE_CLIENT_FPS}Hz\""@endcode |
|
||||
| Undo | @code{}wlr-xrandr --output HDMI-1 --mode 3840x2160@120Hz@endcode |
|
||||
|
||||
@hint{`wlr-xrandr` only works with wlroots-based compositors.}
|
||||
> [!TIP]
|
||||
> `wlr-xrandr` only works with wlroots-based compositors.
|
||||
|
||||
###### Gnome (X11)
|
||||
|
||||
|
|
@ -240,12 +249,12 @@ Installation instructions for displayconfig-mutter can be [found here](https://g
|
|||
[gnome-randr-rust](https://github.com/maxwellainatchi/gnome-randr-rust) and [gnome-randr.py](https://gitlab.com/Oschowa/gnome-randr), but both of those are
|
||||
unmaintained and do not support newer Mutter features such as HDR and VRR.
|
||||
|
||||
@hint{HDR support has been added to Gnome 48, to check if your display supports it you can run this:
|
||||
```
|
||||
displayconfig-mutter list
|
||||
```
|
||||
If it doesn't, then remove ``--hdr`` flag from both ``Do`` and ``Undo`` steps.
|
||||
}
|
||||
> [!TIP]
|
||||
> HDR support has been added to Gnome 48, to check if your display supports it, you can run this:
|
||||
> ```
|
||||
> displayconfig-mutter list
|
||||
> ```
|
||||
> If it doesn't, then remove ``--hdr`` flag from both ``Do`` and ``Undo`` steps.
|
||||
|
||||
###### KDE Plasma (Wayland, X11)
|
||||
|
||||
|
|
@ -254,22 +263,22 @@ If it doesn't, then remove ``--hdr`` flag from both ``Do`` and ``Undo`` steps.
|
|||
| Do | @code{}sh -c "kscreen-doctor output.HDMI-A-1.mode.${SUNSHINE_CLIENT_WIDTH}x${SUNSHINE_CLIENT_HEIGHT}@${SUNSHINE_CLIENT_FPS}"@endcode |
|
||||
| Undo | @code{}kscreen-doctor output.HDMI-A-1.mode.3840x2160@120@endcode |
|
||||
|
||||
@attention{The names of your displays will differ between X11 and Wayland.
|
||||
Be sure to use the correct name, depending on your session manager.
|
||||
e.g. On X11, the monitor may be called ``HDMI-A-0``, but on Wayland, it may be called ``HDMI-A-1``.
|
||||
}
|
||||
> [!CAUTION]
|
||||
> The names of your displays will differ between X11 and Wayland.
|
||||
> Be sure to use the correct name, depending on your session manager.
|
||||
> e.g., On X11, the monitor may be called ``HDMI-A-0``, but on Wayland, it may be called ``HDMI-A-1``.
|
||||
|
||||
@hint{Replace ``HDMI-A-1`` with the display name of the monitor you would like to use for Moonlight.
|
||||
You can list the monitors available to you with:
|
||||
```
|
||||
kscreen-doctor -o
|
||||
```
|
||||
|
||||
These will also give you the supported display properties for each monitor. You can select them either by
|
||||
hard-coding their corresponding number (e.g. ``kscreen-doctor output.HDMI-A1.mode.0``) or using the above
|
||||
``do`` command to fetch the resolution requested by your Moonlight client
|
||||
(which has a chance of not being supported by your monitor).
|
||||
}
|
||||
> [!TIP]
|
||||
> Replace ``HDMI-A-1`` with the display name of the monitor you would like to use for Moonlight.
|
||||
> You can list the monitors available to you with:
|
||||
> ```
|
||||
> kscreen-doctor -o
|
||||
> ```
|
||||
>
|
||||
> These will also give you the supported display properties for each monitor. You can select them either by
|
||||
> hard-coding their corresponding number (e.g. ``kscreen-doctor output.HDMI-A1.mode.0``) or using the above
|
||||
> ``do`` command to fetch the resolution requested by your Moonlight client
|
||||
> (which has a chance of not being supported by your monitor).
|
||||
|
||||
###### NVIDIA
|
||||
|
||||
|
|
@ -281,9 +290,11 @@ hard-coding their corresponding number (e.g. ``kscreen-doctor output.HDMI-A1.mod
|
|||
##### macOS
|
||||
|
||||
###### displayplacer
|
||||
@note{This example uses the `displayplacer` tool to change the resolution.
|
||||
This tool can be installed following instructions in their
|
||||
[GitHub repository](https://github.com/jakehilborn/displayplacer)}.
|
||||
|
||||
> [!NOTE]
|
||||
> This example uses the `displayplacer` tool to change the resolution.
|
||||
> This tool can be installed following instructions in their
|
||||
> [GitHub repository](https://github.com/jakehilborn/displayplacer).
|
||||
|
||||
| Prep Step | Command |
|
||||
|-----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
|
|
@ -295,8 +306,10 @@ Sunshine has built-in support for changing the resolution and refresh rate on Wi
|
|||
third-party tool, you can use *QRes* as an example.
|
||||
|
||||
###### QRes
|
||||
@note{This example uses the *QRes* tool to change the resolution and refresh rate.
|
||||
This tool can be downloaded from their [SourceForge repository](https://sourceforge.net/projects/qres).}
|
||||
|
||||
> [!NOTE]
|
||||
> This example uses the *QRes* tool to change the resolution and refresh rate.
|
||||
> This tool can be downloaded from their [SourceForge repository](https://sourceforge.net/projects/qres).
|
||||
|
||||
| Prep Step | Command |
|
||||
|-----------|---------------------------------------------------------------------------------------------------------------------------|
|
||||
|
|
@ -306,8 +319,10 @@ This tool can be downloaded from their [SourceForge repository](https://sourcefo
|
|||
### Additional Considerations
|
||||
|
||||
#### Linux (Flatpak)
|
||||
@attention{Because Flatpak packages run in a sandboxed environment and do not normally have access to the
|
||||
host, the Flatpak of Sunshine requires commands to be prefixed with `flatpak-spawn --host`.}
|
||||
|
||||
> [!CAUTION]
|
||||
> Because Flatpak packages run in a sandboxed environment and do not normally have access to the
|
||||
> host, the Flatpak of Sunshine requires commands to be prefixed with `flatpak-spawn --host`.
|
||||
|
||||
#### Windows
|
||||
**Elevating Commands (Windows)**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue