add files needed to actually run on pinephone lol

This commit is contained in:
xenia 2022-05-12 01:19:30 -04:00
parent 7b70e802bb
commit 949b05cc7d
2 changed files with 32 additions and 0 deletions

16
dist/50-xenia-systemd-inhibit.rules vendored Normal file
View File

@ -0,0 +1,16 @@
/* allow inhibits all the time for xenia */
polkit.addRule(function(action, subject) {
if ((action.id == "org.freedesktop.login1.inhibit-block-shutdown" ||
action.id == "org.freedesktop.login1.inhibit-delay-shutdown" ||
action.id == "org.freedesktop.login1.inhibit-block-sleep" ||
action.id == "org.freedesktop.login1.inhibit-delay-sleep" ||
action.id == "org.freedesktop.login1.inhibit-block-idle" ||
action.id == "org.freedesktop.login1.inhibit-delay-idle" ||
action.id == "org.freedesktop.login1.inhibit-handle-lid-switch" ||
action.id == "org.freedesktop.login1.inhibit-handle-reboot-key" ||
action.id == "org.freedesktop.login1.inhibit-handle-power-key" ||
action.id == "org.freedesktop.login1.inhibit-handle-suspend-key"
) && subject.isInGroup("xenia-systemd-inhibit")) {
return polkit.Result.YES;
}
});

16
dist/jitsi.sh vendored Executable file
View File

@ -0,0 +1,16 @@
#!/bin/bash
if [ $# -lt 2 ]; then
echo "usage: $0 <domain> <room> [mode]"
fi
domain=$1
room=$2
mode=$3
if [ $mode == "bosh" ]; then
exec systemd-inhibit --what=shutdown:sleep:idle --why="active jitsi session: $domain/$room" --who="gst-meet modxenia" -- .cargo/bin/gst-meet --bosh-url="https://$domain/http-bind?room=$room" --room-name=$room --send-pipeline "autoaudiosrc ! queue ! audioconvert ! audioresample ! opusenc name=audio" --recv-pipeline="audiomixer name=audio ! autoaudiosink" --nick="xeninya (pinephone)"
else
exec systemd-inhibit --what=shutdown:sleep:idle --why="active jitsi session: $domain/$room" --who="gst-meet modxenia" -- .cargo/bin/gst-meet --web-socket-url="wss://$domain/xmpp-websocket?room=$room" --room-name=$room --send-pipeline "autoaudiosrc ! queue ! audioconvert ! audioresample ! opusenc name=audio" --recv-pipeline="audiomixer name=audio ! autoaudiosink" -v --nick="xeninya (pinephone)"
fi