Skip to content

Feature: waybar privacy module#1787

Merged
kRHYME7 merged 4 commits intoprasanthrangan:mainfrom
zeerayne:waybar-privacy-module
Sep 1, 2024
Merged

Feature: waybar privacy module#1787
kRHYME7 merged 4 commits intoprasanthrangan:mainfrom
zeerayne:waybar-privacy-module

Conversation

@zeerayne
Copy link
Contributor

Pull Request

Description

This module shows icons in waybar when screen is recorded/shared or microphone is used.
Looks useful for me, especially screen recording, as I'm using wf-recorder often.

Please note that I added new variable to wbarconfgen.sh named i_priv. Thats because if existing i_task variable is used for icon-size in this module, icons are ridiculously larger than should be.

p.s. I'm not sure about if it is a good idea or not to add privacy module to config.ctl by default. If it is not - i'll revert this commit

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update (non-breaking change; modified files are limited to the documentations)
  • Technical debt (a code change that does not fix a bug or add a feature but makes something clearer for devs)
  • Other (provide details below)

Checklist

Please put an x in the boxes that apply:

  • I have read the CONTRIBUTING document.
  • My code follows the code style of this project.
  • My commit message follows the commit guidelines.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added a changelog entry.
  • I have added necessary comments/documentation to my code.
  • I have added tests to cover my changes.
  • I have tested my code locally and it works as expected.
  • All new and existing tests passed.

Screenshots

Only microphone is used
image

Only screen is shared/captured
image

Both screen is shared and microphone is used
image

Copy link
Collaborator

@kRHYME7 kRHYME7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a question. What happens if we remove icon_size for the module. will it fall back to a constant value? or will it respect the Parent bar?

@zeerayne
Copy link
Contributor Author

Without setting icon_size it defaults to 20. Have checked myself and this is stated in doc.

Copy link
Collaborator

@kRHYME7 kRHYME7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@kRHYME7 kRHYME7 merged commit ab2f6c6 into prasanthrangan:main Sep 1, 2024
@se7en-x230
Copy link

Is it wf- specific or why does it not show any icon while recording with wl-screenrecorder?
image

image

@kRHYME7
Copy link
Collaborator

kRHYME7 commented Sep 1, 2024

@se7en-x230 Might be a waybar issue. will try to check it later

@se7en-x230
Copy link

my config.ctl file is fairly simple

1||top|( hyprland/workspaces hyprland/window ) ( custom/invest )|( clock )|( network pulseaudio ) ( privacy tray battery ) ( mpris ) ( custom/cava )

@zeerayne
Copy link
Contributor Author

zeerayne commented Sep 1, 2024

I've tested it with wf-recorder and gpu-screen-recorder, both worked. Maybe diffetent methods of screen recording are used and not all of them are detected by waybar

@zeerayne zeerayne deleted the waybar-privacy-module branch September 1, 2024 07:23
@se7en-x230
Copy link

se7en-x230 commented Sep 1, 2024

hmm neither of them work for me. I have a constant mic icon that does not change at all.

if I start waybar from the cli I get this error
[2024-09-01 14:57:12.866] [warning] module : Unknown module:

not sure if that realates to
image

Edit:
If I remove the audio part of the modules the constant mic icon is gone but also no icon no matter which recorder I use

@kRHYME7
Copy link
Collaborator

kRHYME7 commented Sep 1, 2024

I only tested this on these platforms. I merged that PR as It's more likely users will be using obs as screen recorder. Maybe this is a waybar issue on how the module polls/queries the status or the screen recorder themeselves

pkg audio video
wl-screenrec / image
obs / / image
wf-recorder / image

BTW wl-screenrec works better now in Hyprland.

@se7en-x230
Copy link

image

custom notification if screenrecorder is running. Not the same but fits my needs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants