Skip to content

Instantly share code, notes, and snippets.

@hermanbanken
Last active December 20, 2015 08:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save hermanbanken/6098140 to your computer and use it in GitHub Desktop.
Save hermanbanken/6098140 to your computer and use it in GitHub Desktop.
Het grote 'zet-de-tv-goed-beunscript'
#!/bin/bash
# Het grote 'zet-de-tv-goed-beunscript'
# Copyrighties belong to me :)
# TO DO BEFORE USAGE
# Hide Unity Launcher
# Install Firefox
# Setup exception for wrong certificates of CH
# Set enabled=0 in /etc/default/apport to prevent error messages
# SCRIPT
export DISPLAY=:0
sleep 5 # Zorg dat alles opgestart is
# TV binnen - overscan/underscan
aticonfig --set-dispattrib=dfp2,sizeX:1920
aticonfig --set-dispattrib=dfp2,sizeY:1080
aticonfig --set-dispattrib=dfp2,positionX:0
aticonfig --set-dispattrib=dfp2,positionY:0
# TV buiten - overscan/underscan
aticonfig --set-dispattrib=dfp1,sizeX:1838
aticonfig --set-dispattrib=dfp1,sizeY:1042
aticonfig --set-dispattrib=dfp1,positionX:42
aticonfig --set-dispattrib=dfp1,positionY:21
# Setup browsers correctly
pkill firefox
sleep 1
# Open Firefoxes
#firefox -new-window https://frans.chnet/staff/tv/index.php?tv=1 -P TV1 &
firefox -new-window http://wisv.ch/tv?title=CHTV1 -P TV1 &
sleep 2
#firefox -new-window https://frans.chnet/staff/tv/index.php?tv=2 -P TV2 &
firefox -new-window http://wisv.ch/tv?title=CHTV2 -P TV2 &
# Wait
sleep 1
# Move screens
wmctrl -r "CHTV1" -e '0,0,0,1920,1080'
wmctrl -r "CHTV2" -e '0,1920,0,1920,1080'
sleep 1
wmctrl -r "CHTV1" -b add,fullscreen
wmctrl -r "CHTV2" -b add,fullscreen
# Press shift every 30 seconds
sh `while sleep 30 ; do xdotool keydown Shift_L keyup Shift_L ; done` &
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment