brndnmtthws/conky — pull request #7 by alcazoid (2013-04-09 15:00:08+00:00)
Title: Fix short process names in top

Conky takes process names from /proc/\/stat and it's limited to 16
chars in kernel. That obviously makes top_name_width option to work only
for decreasing name length. To obtain longer names we parse
/proc/\/cmdline.

Not every process has cmdline, so we take both process names and choose
one we want to use. Like this:

- Get process name from /proc/\/stat

- Get process cmdline from /proc/\/cmdline

- Transform cmdline to a bit simpler form(i.e. "/usr/bin/python
/usr/bin/terminator" to "python /usr/bin/terminator"), keeping
the arguments(might be changed easily)

- Choose the one that is longer and use it