Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Use /proc/.../cmdline instead of /proc/.../comm #2034

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

subnut
Copy link

@subnut subnut commented Jan 22, 2022

/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.

Before

         eeeeeeeeeeeeeeeee            subnut@elementary 
      eeeeeeeeeeeeeeeeeeeeeee         ----------------- 
    eeeee  eeeeeeeeeeee   eeeee       OS: elementary OS 6.1 Jólnir x86_64 
  eeee   eeeee       eee     eeee     Host: LENOVO 20YDCTO1WW 
 eeee   eeee          eee     eeee    Kernel: 5.13.0-27-generic 
eee    eee            eee       eee   Uptime: 1 hour, 44 mins 
eee   eee            eee        eee   Packages: 1846 (dpkg), 49 (flatpak) 
ee    eee           eeee       eeee   Shell: bash 5.0.17 
ee    eee         eeeee      eeeeee   Resolution: 1920x1080 
ee    eee       eeeee      eeeee ee   DE: Pantheon 
eee   eeee   eeeeee      eeeee  eee   WM: Mutter(Gala) 
eee    eeeeeeeeee     eeeeee    eee   Theme: io.elementary.stylesheet.banana [GTK3] 
 eeeeeeeeeeeeeeeeeeeeeeee    eeeee    Icons: elementary [GTK3] 
  eeeeeeee eeeeeeeeeeee      eeee     Terminal: io.elementary.t 
    eeeee                 eeeee       CPU: AMD Ryzen 7 5700U with Radeon Graphics (16) @ 1.800GHz 
      eeeeeee         eeeeeee         GPU: AMD ATI Device 164c 
         eeeeeeeeeeeeeeeee            Memory: 5467MiB / 21843MiB 

After

         eeeeeeeeeeeeeeeee            subnut@elementary 
      eeeeeeeeeeeeeeeeeeeeeee         ----------------- 
    eeeee  eeeeeeeeeeee   eeeee       OS: elementary OS 6.1 Jólnir x86_64 
  eeee   eeeee       eee     eeee     Host: LENOVO 20YDCTO1WW 
 eeee   eeee          eee     eeee    Kernel: 5.13.0-27-generic 
eee    eee            eee       eee   Uptime: 1 hour, 52 mins 
eee   eee            eee        eee   Packages: 1846 (dpkg), 49 (flatpak) 
ee    eee           eeee       eeee   Shell: bash 5.0.17 
ee    eee         eeeee      eeeeee   Resolution: 1920x1080 
ee    eee       eeeee      eeeee ee   DE: Pantheon 
eee   eeee   eeeeee      eeeee  eee   WM: Mutter(Gala) 
eee    eeeeeeeeee     eeeeee    eee   Theme: io.elementary.stylesheet.banana [GTK3] 
 eeeeeeeeeeeeeeeeeeeeeeee    eeeee    Icons: elementary [GTK3] 
  eeeeeeee eeeeeeeeeeee      eeee     Terminal: io.elementary.terminal 
    eeeee                 eeeee       CPU: AMD Ryzen 7 5700U with Radeon Graphics (16) @ 1.800GHz 
      eeeeeee         eeeeeee         GPU: AMD ATI Device 164c 
         eeeeeeeeeeeeeeeee            Memory: 5824MiB / 21843MiB 

@hykilpikonna
Copy link

hykilpikonna commented Aug 11, 2022

Shellcheck says "read without -r will mangle backslashes"
https://www.shellcheck.net/wiki/SC2162

Maybe add -r after read?

/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.
hykilpikonna added a commit to hykilpikonna/hyfetch that referenced this pull request Aug 12, 2022
…tead of /proc/.../comm

Upstream PR: dylanaraps/neofetch#2034
Thanks to @subnut

Co-authored-by: Subhaditya Nath <sn03.general@gmail.com>
@hykilpikonna
Copy link

Thank you for your contribution!

This PR is merged into hyfetch since this repo (dylanaraps/neofetch) seems no longer maintained.

HyFetch is a fork of neofetch with LGBTQ pride flags, but the repo also maintains an updated version of the original neofetch, addressing many pull requests that are not merged in the original repo.

Read the "Running Updated Original Neofetch" section for more info!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants