There's no need for eval, it's pointless and vulnerable. Also since we're expanding a variable, it's a good idea to quote it.

SpaceshipOperations 2021-03-10 02:12:24 +03:00
parent 4cead0e428
commit 0e68ae9aa7

@ -501,8 +501,7 @@ This script detects which is the device path of the integrated card and launches
```sh
#!/bin/sh
val=$(udevadm info -a -n /dev/dri/card1 | grep boot_vga | rev | cut -c 2)
cmd="WLR_DRM_DEVICES=/dev/dri/card$val sway"
eval "$cmd"
WLR_DRM_DEVICES="/dev/dri/card$val" sway
```
You can also configure multiple graphics cards like so: