-
-
Notifications
You must be signed in to change notification settings - Fork 620
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
Implement -U
for Linux
#2049
Implement -U
for Linux
#2049
Conversation
If this argument is provided Conky won't start if another Conky process is already running.
✅ Deploy Preview for conkyweb canceled.
|
A couple issues: Another problem, getting the process name from |
Thanks! It's the typical case of "it works on my machine"... |
The previous method used `/proc` to check the running processes, but it is a Linux-specific solution. This method uses `ps`, hopefully in a POSIX-compliant way. Linux: https://man7.org/linux/man-pages/man1/ps.1.html FreeBSD: https://man.freebsd.org/cgi/man.cgi?ps(1) OpenBSD: https://man.openbsd.org/ps.1
A random process named `conky11` won't stop Conky to start when `-U` is provided.
I know I'm a bit late on getting back to you on this, and I apologize for that. I am not a big fan of shelling out to And to clarify, when I say "original patch" I mean reading from |
No problem at all. I tested the It feels a "good enough" soultion for me as well, but this was the most POSIX-way I can came up with. |
I can do the |
Use `/proc/[pid]/stat` to check if conky is already running. This will only work on systems where there is a `/proc`.
Signed-off-by: Tin Švagelj <[email protected]>
I just added |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good, I have one minor request (to move the Linux-only code to src/linux.cc
.
This option seems like a useful addition. For, one can find a few reports on the web of people ending up with weird-looking conkies that turn out to be one conky superimposed upon another. I've encountered that myself. So there's even a case for making this option the default. |
Thanks! I can try to implement this feature on some BSDs if @brndnmtthws finds it as useful as you. |
After triaging issues I'd say changing the defaults will likely cause more confusion than having the option be opt-in. A lot of setups also spawn several conky instances to show information in different corners of the screen for example.
It would be a nice feature-parity addition, but it's up to you. I opened #2072, so you can use it as a guide on which platforms need to be supported if you decide to add support any other. I will also redirect people there if they open new issues about the feature not being supported for one of those platforms. |
Question: will |
It depends on how |
If this argument is provided Conky won't start if another Conky process is already running.
Conky starts multiple times on my system at startup, and it is bothering me. I'm too lazy to check all of my config files, so I added this mechanism to prevent this behavior.