'.config/systemd/user/hikari-for-wayland-display.sh' hinzufügen
This commit is contained in:
parent
7b12747f59
commit
26ffa8b728
1 changed files with 22 additions and 0 deletions
22
.config/systemd/user/hikari-for-wayland-display.sh
Normal file
22
.config/systemd/user/hikari-for-wayland-display.sh
Normal 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
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue