diff --git a/.config/systemd/user/hikari-for-wayland-display.sh b/.config/systemd/user/hikari-for-wayland-display.sh new file mode 100644 index 0000000..b32c6d7 --- /dev/null +++ b/.config/systemd/user/hikari-for-wayland-display.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +i=1 + +while [ "$i" -ne 100 ] +do + systemctl --user show-environment | grep WAYLAND_DISPLAY > /dev/null + + # Return status of grep is 0 when found 1 if not found + status=$? + + # Break loop to skip sleep if found on first try + if [ $status -eq 0 ]; then + echo Display has been found. + break + fi + + sleep 0.1s + # Increment + i=$((i + 1)) +done +