Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 29 additions & 24 deletions steam-login/usr/bin/steam-de
Original file line number Diff line number Diff line change
Expand Up @@ -255,32 +255,37 @@ xset s off
INFO "Execute Steam"
INFO "Exec line: $PREFIX $PROGRAM $STEAM_ARGS"
if [ ! -z "$PREFIX" ]; then
$PREFIX $PROGRAM $STEAM_ARGS &
$PREFIX $PROGRAM $STEAM_ARGS
else
$PROGRAM $STEAM_ARGS &
$PROGRAM $STEAM_ARGS
fi

INFO "Wait until steam window will be visible"
while ! check_steam_window; do
sleep 0.5
read STEAM_PID < $HOME/.steampid
if [ ! -d "/proc/$STEAM_PID" ]; then
zenity --error --text "Ops! Steam had some trouble to run. That can be a problem with steam itself or with your configuration."
ERRO "Ops! Steam had some trouble to run. That can be a problem with steam itself or with your configuration."
fi
done
INFO "Steam working"

INFO "Wait while steam running"

# self kill on steam exit
{
while [ -d "/proc/$STEAM_PID" ]; do sleep 1; done
kill $STEAM_DE_PID &> /dev/null
} &

while check_steam_window; do
sleep 10
done
## all these lines are disabled, becouse i don't know why you would run steam in the background and then
## use all kinds of hacky ways of testing for steam running... you could even start in the background, then use `wait`!!!

# INFO "Wait until steam window will be visible"
# while ! check_steam_window; do
# sleep 0.5
# read STEAM_PID < $HOME/.steampid
# if [ ! -d "/proc/$STEAM_PID" ]; then
# zenity --error --text "Ops! Steam had some trouble to run. That can be a problem with steam itself or with your configuration."
# ERRO "Ops! Steam had some trouble to run. That can be a problem with steam itself or with your configuration."
# fi
# done
# INFO "Steam working"

# INFO "Wait while steam running"

# # self kill on steam exit
# {
# while [ -d "/proc/$STEAM_PID" ]; do sleep 1; done
# kill $STEAM_DE_PID &> /dev/null
# } &

# while check_steam_window; do
# sleep 10
# done

steam_de_exit

exit 0