project-openspace.sh
· 894 B · Bash
Brut
#! /usr/bin/env bash
function cleanup() {
echo 'restoring mouse cursor'
killall xbanish
echo 'restoring desktop monitor'
/usr/local/bin/unprojectorify.sh
echo 'restoring screen blank and suspend on idle'
gsettings set org.gnome.desktop.session idle-delay 120
gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-type 'suspend'
}
trap cleanup SIGINT
export DISPLAY=:1
echo 'use HDMI display only and send audio there'
/usr/local/bin/projectorify.sh
echo 'disabling screen blanking and suspend on idle'
gsettings set org.gnome.desktop.session idle-delay 0
gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-type 'nothing'
echo 'hiding mouse cursor'
xbanish -a &
echo 'launching OpenSpace'
cd ~/Sites/src/OpenSpace
./bin/OpenSpace -b -p './user/data/profiles/remote projection.profile' -c ./user/config/uhd-projection.json
cleanup
| 1 | #! /usr/bin/env bash |
| 2 | |
| 3 | function cleanup() { |
| 4 | echo 'restoring mouse cursor' |
| 5 | killall xbanish |
| 6 | |
| 7 | echo 'restoring desktop monitor' |
| 8 | /usr/local/bin/unprojectorify.sh |
| 9 | |
| 10 | echo 'restoring screen blank and suspend on idle' |
| 11 | gsettings set org.gnome.desktop.session idle-delay 120 |
| 12 | gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-type 'suspend' |
| 13 | } |
| 14 | |
| 15 | trap cleanup SIGINT |
| 16 | |
| 17 | export DISPLAY=:1 |
| 18 | |
| 19 | echo 'use HDMI display only and send audio there' |
| 20 | /usr/local/bin/projectorify.sh |
| 21 | |
| 22 | echo 'disabling screen blanking and suspend on idle' |
| 23 | gsettings set org.gnome.desktop.session idle-delay 0 |
| 24 | gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-type 'nothing' |
| 25 | |
| 26 | echo 'hiding mouse cursor' |
| 27 | xbanish -a & |
| 28 | |
| 29 | echo 'launching OpenSpace' |
| 30 | cd ~/Sites/src/OpenSpace |
| 31 | ./bin/OpenSpace -b -p './user/data/profiles/remote projection.profile' -c ./user/config/uhd-projection.json |
| 32 | |
| 33 | cleanup |
projectorify.sh
· 171 B · Bash
Brut
#! /usr/bin/env bash
xrandr --output HDMI-0 --auto --mode 3840x2160 --primary --output DP-4 --off
pactl set-default-sink alsa_output.pci-0000_07_00.1.hdmi-surround-extra2
| 1 | #! /usr/bin/env bash |
| 2 | |
| 3 | xrandr --output HDMI-0 --auto --mode 3840x2160 --primary --output DP-4 --off |
| 4 | pactl set-default-sink alsa_output.pci-0000_07_00.1.hdmi-surround-extra2 |
unprojectorify.sh
· 81 B · Bash
Brut
#! /usr/bin/env bash
xrandr --output DP-4 --auto --primary --output HDMI-0 --off
| 1 | #! /usr/bin/env bash |
| 2 | |
| 3 | xrandr --output DP-4 --auto --primary --output HDMI-0 --off |