Closed lieux closed 5 years ago
This is just threads.
You can see this by noting that:
${your_number_of_widgets} + 1
of them;htop
, only one of them has white color, as opposed to green (assuming the “Display threads in a different color” option is turned on and the default color scheme is used);htop
, after turning on “Hide userland process threads” in “Setup” → “Display options”, all of them but one disappear;ps -C luastatus
only shows one process, while ps -T -C luastatus
shows all of them (plus some weird thing named threaded-ml
, I have no idea what it is).You're right. But I don't see threaded-ml
.
I did some investigation. Doing ps -C luastatus
after a couple of refreshes really return multiple instances. But I figured a workaround and just placed this in my i3 config:
status_command exec bash -c '[[ ! -z $(pgrep -x luastatus) ]] && pkill -x luastatus; luastatus-i3-wrapper -B no_separators ~/.config/luastatus/i3bar/*.lua || luastatus-i3-wrapper -B no_separators ~/.config/luastatus/i3bar/*.lua'
What i3 version do you use?
I'm using the latest stable release i3-gaps-4.16.1-1
.
My guess is that whenever I reload i3
, the status_command
executes again and, thus, running another luastatus
process.
By “reload” you mean doing i3-msg reload
, right?
I don’t know what the problem is yet, but what’s the point of this part of your script?
luastatus-i3-wrapper -B no_separators ~/.config/luastatus/i3bar/*.lua || luastatus-i3-wrapper -B no_separators ~/.config/luastatus/i3bar/*.lua
This is redundant because, in normal circumstances, luastatus will not terminate until i3bar wants it to. Probably the problem is in your status_command
script.
Could you please paste the status_command
string of the configuration where the problem reproduces?
My guess is that whenever I reload i3, the status_command executes again and, thus, running another luastatus process.
But before executing status_command
again, i3bar sends SIGTERM
to the previous instance, thus doing exactly the right thing.
In my i3 config, I combined reload and restart in one binding. I guess that's the culprit:
bindsym $mod+F5 reload restart
This was my status_command
before replacing it:
status_command exec luastatus-i3-wrapper -B no_separators ~/.config/luastatus/i3bar/*.lua
What’s the reason of closing?
I tried reloading i3 for a couple of times. And upon checking htop, I now have multiple instances of luastatus running.