Add example script to switch primary and secondary display applications

also don't run detect-second-display multiple times during a session.
This commit is contained in:
Alexander Grothe
2018-09-30 10:57:26 +02:00
parent ae5d68ed79
commit 1fbd634d43
5 changed files with 544 additions and 473 deletions

View File

@@ -0,0 +1,9 @@
#!/bin/bash
source <(systemctl --user show-environment)
[[ "$DISPLAY" =~ \.1$ ]] && DISPLAY="${DISPLAY%.1}.0" || DISPLAY="${DISPLAY%.0}.1"
frontend-dbus-send stop
systemctl --user stop osd2web
frontend-dbus-send setDisplay "$DISPLAY"
systemctl --user start osd2web
frontend-dbus-send start