mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-11-17 10:35:10 +00:00
argument of $cmdline_to_pid doesnt have to be the full commandline
This commit is contained in:
parent
7b6e01b869
commit
038e182c38
@ -538,9 +538,10 @@
|
||||
<command>
|
||||
<option>cmdline_to_pid</option>
|
||||
</command>
|
||||
<option>pid</option>
|
||||
<option>string</option>
|
||||
</term>
|
||||
<listitem>PID of process invoked with this command line
|
||||
<listitem>PID of the first process that has string in it's
|
||||
commandline
|
||||
<para /></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
|
@ -342,7 +342,7 @@ void print_cmdline_to_pid(struct text_object *obj, char *p, int p_max_size) {
|
||||
for(i = 0; i < bytes_read - 1; i++) {
|
||||
if(buf[i] == 0) buf[i] = ' ';
|
||||
}
|
||||
if(strcmp(buf, obj->data.s) == 0) {
|
||||
if(strstr(buf, obj->data.s) != NULL) {
|
||||
snprintf(p, p_max_size, "%s", entry->d_name);
|
||||
free(buf);
|
||||
closedir(dir);
|
||||
|
Loading…
Reference in New Issue
Block a user