mirror of
https://github.com/kasmtech/workspaces-core-images.git
synced 2025-01-22 05:08:39 +01:00
Merge branch 'feature/KASM-2393-disable-verbose-logging-of-process-watchers-in-custom-startup' into 'develop'
KASM-2393 Silence logging in the maximize loop Closes KASM-2393 See merge request kasm-technologies/internal/workspaces-core-images!52
This commit is contained in:
commit
154764f8ad
@ -1,16 +1,21 @@
|
||||
# MAXIMIZE and MAXIMIZE_NAME are exported by the calling script
|
||||
# This script will check against the container OS to do the right thing.
|
||||
enable_x=0
|
||||
|
||||
maximize_window(){
|
||||
set +e
|
||||
if [[ ${MAXIMIZE} == 'true' ]] ; then
|
||||
if [[ $- =~ x ]] ;
|
||||
then
|
||||
set +x
|
||||
enable_x=1
|
||||
fi
|
||||
while true; do
|
||||
end=$((SECONDS+60))
|
||||
while [ $SECONDS -lt $end ]; do
|
||||
windows=$(wmctrl -l)
|
||||
if [[ "$windows" =~ "${MAXIMIZE_NAME}" ]];
|
||||
then
|
||||
echo "Found ${MAXIMIZE_NAME}, maximizing"
|
||||
wmctrl -r "${MAXIMIZE_NAME}" -b add,maximized_vert,maximized_horz
|
||||
break;
|
||||
fi
|
||||
@ -18,6 +23,10 @@ maximize_window(){
|
||||
done
|
||||
sleep 10
|
||||
done
|
||||
if [[ ${enable_x} -eq 1 ]];
|
||||
then
|
||||
set -x
|
||||
fi
|
||||
fi
|
||||
set -e
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user