SpectreOS/configs/.bash_profile-sway

7 lines
230 B
Bash
Raw Normal View History

2022-10-04 19:01:31 +02:00
# 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