Skip to content

Commit

Permalink
slack: fix screen sharing on wayland
Browse files Browse the repository at this point in the history
Slack blacklists the electron feature to allow screen capture via
Pipewire for unknown reasons. This change applies the same workaround
as the unofficial slack flatpack to get it working again.

(cherry picked from commit 5f6b9d7)
  • Loading branch information
tobim authored and bjornfor committed Apr 21, 2024
1 parent cb4064c commit a5e4bbc
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,11 @@ let
--replace /usr/bin/ $out/bin/ \
--replace /usr/share/pixmaps/slack.png slack \
--replace bin/slack "bin/slack -s"
'' + lib.optionalString stdenv.hostPlatform.isLinux ''
# Prevent Un-blacklist pipewire integration to enable screen sharing on wayland.
# https://github.com/flathub/com.slack.Slack/issues/101#issuecomment-1807073763
sed -i -e 's/,"WebRTCPipeWireCapturer"/,"LebRTCPipeWireCapturer"/' $out/lib/slack/resources/app.asar
'' + ''
runHook postInstall
'';
};
Expand Down

0 comments on commit a5e4bbc

Please sign in to comment.