SpectreOS/configs/.bash_profile-sway
2022-10-04 19:01:31 +02:00

6 lines
230 B
Bash
Executable file

# If running from tty1 start sway
if [ "$(tty)" = "/dev/tty1" ]; then
val=$(udevadm info -a -n /dev/dri/card1 | grep boot_vga | rev | cut -c 2)
cmd="WLR_DRM_DEVICES=/dev/dri/card$val sway"
if ! eval "$cmd"; then sway; fi
fi