'.config/systemd/user/hikari-for-wayland-display.sh' hinzufügen

This commit is contained in:
Kaisa Marysia 2021-04-03 00:34:29 +02:00
parent 7b12747f59
commit 26ffa8b728

View file

@ -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