Skip to content

Commit

Permalink
Use /proc/.../cmdline instead of /proc/.../comm
Browse files Browse the repository at this point in the history
/proc/.../comm is limited to 16 bytes. So, long terminal names like
io.elementary.terminal (default terminal for Elementary OS) gets
truncated to 15 characters.
  • Loading branch information
subnut committed Aug 12, 2022
1 parent ccd5d9f commit 2fb6f21
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion neofetch
Original file line number Diff line number Diff line change
Expand Up @@ -4943,7 +4943,7 @@ get_process_name() {
;;

"Linux")
name="$(< "/proc/${1:-$PPID}/comm")"
read -rd $'\00' name < "/proc/${1:-$PPID}/cmdline"
;;

*)
Expand Down

0 comments on commit 2fb6f21

Please sign in to comment.