Add native ScreenCast portal with PipeWire monitor streams

This commit is contained in:
Samuel Onoja committed 2026-09-28 07:54:22 +01:00
1 parent cb512eece9
commit e7d92280d6
21 files changed
+2228 -15

No files matched your search

+1
View File
@@ -29,6 +29,7 @@ theme {
}
window-rule app-id="dev.ferese.Settings" floating=#true
window-rule app-id="dev.ferese.ScreenShare" floating=#true
window-rule title="Choose a wallpaper" floating=#true
desktop-widgets {
+4 -1
View File
@@ -32,6 +32,9 @@ export PATH="$release_dir:$PATH"
unset WAYLAND_SOCKET
if [[ $backend == drm ]]; then
unset DISPLAY WAYLAND_DISPLAY
export FERESE_SESSION_IMPORT_ENV=1
else
export FERESE_SESSION_IMPORT_ENV=0
fi
if [[ $backend == drm ]] && command -v systemctl >/dev/null; then
@@ -39,7 +42,7 @@ if [[ $backend == drm ]] && command -v systemctl >/dev/null; then
fi
command=("$release_dir/ferese" --backend "$backend" --grant-effects
--grant-shell-control -- "$release_dir/ferese-shell")
--grant-shell-control -- "$release_dir/ferese-session-shell")
if [[ -z ${DBUS_SESSION_BUS_ADDRESS:-} ]]; then
exec dbus-run-session -- "${command[@]}"
else
+12
View File
@@ -0,0 +1,12 @@
#!/usr/bin/env bash
set -euo pipefail
# The compositor supplies its new Wayland socket before this helper starts.
# Nested previews must never replace the host session's activation environment.
if [[ ${FERESE_SESSION_IMPORT_ENV:-0} == 1 ]]; then
dbus-update-activation-environment --systemd \
WAYLAND_DISPLAY XDG_CURRENT_DESKTOP XDG_SESSION_DESKTOP XDG_SESSION_TYPE || \
dbus-update-activation-environment \
WAYLAND_DISPLAY XDG_CURRENT_DESKTOP XDG_SESSION_DESKTOP XDG_SESSION_TYPE || true
fi
release_dir=$(dirname -- "$(readlink -f -- "$0")")
exec "$release_dir/ferese-shell"
+3
View File
@@ -0,0 +1,3 @@
[preferred]
default=gtk;
org.freedesktop.impl.portal.ScreenCast=ferese;
+4
View File
@@ -0,0 +1,4 @@
[portal]
DBusName=org.freedesktop.impl.portal.desktop.ferese
Interfaces=org.freedesktop.impl.portal.ScreenCast;
UseIn=Ferese;
@@ -0,0 +1,3 @@
[D-BUS Service]
Name=org.freedesktop.impl.portal.desktop.ferese
Exec=/usr/local/lib/ferese/current/xdg-desktop-portal-ferese