Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add screen recording indicator to bar #1058

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

aliqut
Copy link
Contributor

@aliqut aliqut commented Jan 23, 2025

Adds a red circle to the statusbar when wf-recorder is active.

Not sure if there's a better way to check if wf-recorder is running other than polling every 2 secs.

@Chiron8
Copy link
Contributor

Chiron8 commented Jan 27, 2025

Maybe having a script that runs when wf-recorder is started would be more efficient? I might test this soon... Nice idea!

@aliqut
Copy link
Contributor Author

aliqut commented Feb 1, 2025

Maybe having a script that runs when wf-recorder is started would be more efficient? I might test this soon... Nice idea!

I'm not very comfortable with AGS, how would I go about doing this?

@Chiron8
Copy link
Contributor

Chiron8 commented Feb 3, 2025

Maybe having a script that runs when wf-recorder is started would be more efficient? I might test this soon... Nice idea!

I'm not very comfortable with AGS, how would I go about doing this?

What I would probably do is add a line to the script that runs wf-recorder that changes an environment variable. Then When the ags bar updates (e.g. when the ram and cpu usage updates) check the value of the global variable? It should be quite simple to implement and shouldn't reduce performance.

Copy link
Contributor

@Chiron8 Chiron8 left a comment

Choose a reason for hiding this comment

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

Sorry for not reviewing properly! I'll try and add a script soon. I feel polling the status of the screen recorder is quite inefficient.

@Chiron8
Copy link
Contributor

Chiron8 commented Feb 9, 2025

Okay, I've requested some changes to the service file. I tried to clean up the code a little and made a few changes which could slightly increase the efficiency. Unfortunately, I couldn't find a way to not have the code poll pgrep. I'm not great at javascript or CSS but it seems to be working well on my computer. It's my first time directly editing a pr so let me know if i've done anything wrong!

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.

2 participants