Update xsession with browser hiding.

This commit is contained in:
Jarno Rantanen 2018-08-12 12:50:40 +03:00
parent 18e8aa5e27
commit 0fd3a2a04b

View File

@ -1,8 +1,10 @@
#!/bin/bash #!/bin/bash
export DISPLAY=:0.0
# Start cursor at the top-left corner, as opposed to the default of dead-center # Start cursor at the top-left corner, as opposed to the default of dead-center
# (so it doesn't accidentally trigger hover styles on elements on the page) # (so it doesn't accidentally trigger hover styles on elements on the page)
DISPLAY=:0.0 xdotool mousemove 0 0 xdotool mousemove 0 0
# Set some useful X preferences # Set some useful X preferences
xset s off # don't activate screensaver xset s off # don't activate screensaver
@ -30,5 +32,11 @@ find .config/chromium/ -name "Last *" | xargs rm
# http://peter.sh/experiments/chromium-command-line-switches/ # http://peter.sh/experiments/chromium-command-line-switches/
chromium-browser --start-fullscreen --disable-infobars & chromium-browser --start-fullscreen --disable-infobars &
# Hide Chromium while it's starting/loading the page
wid=`xdotool search --sync --onlyvisible --class chromium`
xdotool windowunmap $wid
sleep 10 # give the web page time to load
xdotool windowmap $wid
# Finally, switch process to our window manager # Finally, switch process to our window manager
exec matchbox-window-manager -use_titlebar no exec matchbox-window-manager -use_titlebar no