omarchy icon indicating copy to clipboard operation
omarchy copied to clipboard

Stop Recording icon always showing on waybar

Open Matt-Ord opened this issue 1 year ago • 18 comments

System details

Omarchy 3.1.1

What's wrong?

'Stop Recording' icon always showing on waybar. It is also inconsistently showing across the three monitors, and no recording is saved when i click the icon

Matt-Ord avatar Oct 21 '25 07:10 Matt-Ord

Strange. Try omarchy-restart-waybar. Possible it got stuck from something. Did you ever do a recording?

dhh avatar Oct 21 '25 14:10 dhh

https://github.com/basecamp/omarchy/issues/2628

BBISWilliams avatar Oct 21 '25 17:10 BBISWilliams

Strange. Try omarchy-restart-waybar. Possible it got stuck from something. Did you ever do a recording?

Never started any recordings. Just 'showed up'. omarchy-restart-waybar fixed it for me. Haven't restarted yet. So, can't report if the fix is permanent or not.

HybridSarcasm avatar Oct 21 '25 18:10 HybridSarcasm

Can confirm I get the same thing occasionally since updating omarchy. I haven't even entered the record command. Clicking it print a notification that a recording was saved, but nothing is actually saved

Coletronix avatar Oct 21 '25 20:10 Coletronix

Same behavior for me. I have noticed that clicking does stop and save the recording. I can get the icon to disappear with a right click though. While it's still running, right clicking does nothing. Left clicking stops it and then I can right click to make it disappear.

Also if anyone is having the issue that it's not recording at all on some screens: I have noticed that the recording cannot handle negative pixel coordinates. So if your monitor.conf sets up screens with negative coordinates, you'll have to change that and then it seems to work. Found out by running the omarchy-cmd-screenrecord command manually in the terminal.

YvesCB avatar Oct 26 '25 09:10 YvesCB

I also have the same behavior. I haven't started any recording and upon clicking the icon it lets me select an area on my screen (similar to the screenshot selection).

olehrstm avatar Oct 26 '25 11:10 olehrstm

I noticed this yesterday as well.

landsman avatar Oct 27 '25 09:10 landsman

cc @ryanrhughes.. somehow gpu-screen-recorder must be running? Here's the indicator:

if pgrep -f "gpu-screen-recorder" >/dev/null; then
  echo '{"text": "󰻂", "tooltip": "Stop recording", "class": "active"}'
else
  echo '{"text": ""}'
fi

dhh avatar Oct 27 '25 10:10 dhh

same problem here.

gpu-screen-recorder doesn't seem to be running

interestingly, I have a dual screen setup - and it only shows on one screen

Image

derluke avatar Oct 28 '25 12:10 derluke

aha: when I say pkill -RTMIN+8 waybar without a recording indicator, it then shows one.

derluke avatar Oct 28 '25 12:10 derluke

I have the same issue, and I have two screens when I click on it on one screen I goes to the other screen an so on running omarchy-restart-waybar fixed it (at least toporarily, lets see if it will appear again)

HussainElemam avatar Oct 28 '25 12:10 HussainElemam

not an issue with gpu screen recorder. uninstalled gpu-screen-recorder and tried recording. it shows its recording and saving files. but nothing was recorded. and the icon still persists in waybar. i restarted waybar but still the issue crops up everytime.

right clicking makes the issue go away until next reboot or trigger screenshot or recording.

my guess something to do with whatever you are using to control the screen shots and recording.

rajshekardev avatar Oct 28 '25 22:10 rajshekardev

On Omarchy 3.1.4 I noticed the same issue. The recording icon appeared for me after signing back in after a system suspend. When I clicked on the icon my mouse pointer changed to crosshairs to allow for selecting a section of screen to record or take a snapshot of.

I did not try to record anything, but instead pressed the escape key. The crosshairs disappeared and the screen recording icon disappeared as well.

Orinax avatar Oct 29 '25 22:10 Orinax

I dug into this and might have found why the indicator appears randomly. The issue is a race condition when pgrep finds itself in the process list.

The underlying script $OMARCHY_PATH/default/waybar/indicators/screen-recording.sh uses

if pgrep -f "gpu-screen-recorder" >/dev/null; then

to check if recording is active. However, pgrep -f searches the full command line of ALL running processes - including its own.

On multi-monitor setups, waybar appears to run the indicator script twice simultaneously (once per monitor). When both scripts execute at nearly the same time, each pgrep process finds the OTHER pgrep process in the system's process list, creating a false positive.

When I logged the events, it showed:

[10:01:13.853] Script called
[10:01:13.854] Script called              ← Two calls, milliseconds apart
[10:01:13.854] pgrep matches: [223056 pgrep -fa gpu-screen-recorder]
[10:01:13.853] pgrep matches: [223058 pgrep -fa gpu-screen-recorder]

On my dual-monitor setup I got two different PIDs (223056 and 223058) - these are likely the two pgrep processes launched for each monitor. Each one finds the other running and thinks recording is active.

Proposed Fix:

Change line 2 in $OMARCHY_PATH/default/waybar/indicators/screen-recording.sh from:

if pgrep -f "gpu-screen-recorder" >/dev/null; then

To:

if pgrep -f "^gpu-screen-recorder" >/dev/null 2>&1; then

The ^ anchor limits regexp matches to the start of the command line.

How to test:

  1. Without fix: pkill -RTMIN+8 waybar incorrectly shows the indicator (possibly only on multi-monitor setups)
  2. With fix: pkill -RTMIN+8 waybar keeps indicator hidden
  3. With fix: omarchy-cmd-screenrecord correctly shows indicator when recording, hides when stopped. Working as expected.

Would appreciate tests by others, especially with multi-monitor setups.

davszp avatar Oct 31 '25 08:10 davszp

@davidszp Tested this fix with a dual monitor setup. It seems to fix the issue as described.

ollipirttila avatar Oct 31 '25 08:10 ollipirttila

Confirmed from my side as well

derluke avatar Oct 31 '25 08:10 derluke

Confirmed this fix with a dual monitor config. Thank you!

flavorjones avatar Oct 31 '25 09:10 flavorjones

Fixed on dev. Thanks @davidszp 👍

dhh avatar Oct 31 '25 13:10 dhh