greshake / i3status-rust

Very resourcefriendly and feature-rich replacement for i3status, written in pure Rust
GNU General Public License v3.0
2.81k stars 472 forks source link

Add a new privacy indicator #1973

Closed emersion closed 4 months ago

emersion commented 6 months ago

Use PipeWire to figure out when the microphone, camera, or screen capture is in use.

Ref https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2840

bim9262 commented 6 months ago

I've started work a privacy indicator. I checked my setup though and my camera doesn't appear to be used by pipewire (although I see it listed). Applications are using it directly (the webcam shows up in v4l).

Other drivers:

emersion commented 6 months ago

Note, more applications should move to PipeWire for camera as the ecosystem moves to libcamera. But yeah, it's still the early days.

MaxVerevkin commented 4 months ago

Is there something left not implemented in #1982?

bim9262 commented 4 months ago

This issue was about pipewire monitoring. If someone wants to add another driver another issue can be opened.

emersion commented 4 months ago

Thank you for working on this!

bim9262 commented 4 months ago

You're welcome, it was a fun block to work on

kevenwyld commented 4 months ago

I'm trying to use this (Because it's really cool!) however I noticed the docs say pipewire Options (requires the pipewire feature to be enabled). Unfortunately it doesn't mention which feature as far as I can tell and audio/screencapture don't seem to be working. I read through the PR but I'm still not quite sure what I should be enabling or if these features should work like I'm expecting. Is there additional documentation I should be looking at or does anyone here have any suggestions?

EDIT: Some clarification:

This works fine:

[[block]]
block = "privacy"
[[block.driver]]
name = "v4l"

Both of these don't work and return Configuration error, probably because block.driver v4l is required per the docs. Or maybe because pipewire isn't configured correctly?

[[block]]
block = "privacy"
[[block.driver]]
name = "pipewire"
[[block]]
block = "privacy"
[[block.driver]]
name = "v4l"
[[block.driver]]
name = "pipewire"

Thanks!

MaxVerevkin commented 4 months ago

@kevenwyld you have to compile with -F pipewire flag.

kevenwyld commented 4 months ago

@kevenwyld you have to compile with -F pipewire flag.

That worked perfectly, thanks!