mikesart / inotify-info

Linux inotify info reporting app
MIT License
298 stars 31 forks source link

Alignment issues in the `Watches` and `Instances` columns #5

Closed fatso83 closed 1 year ago

fatso83 commented 1 year ago

There are alignment issues in the Watches and Instances columns. It's hard to tell why they sometimes seem aligned on one boundary and elsewhere on another, but I am guessing there are some tabulator boundaries messing up the formatting most of the time.

There is also the issue of the App column not being constrained in any way, overflowing into/pushing the content of the Watches column, like on on the lines containing (deleted).

------------------------------------------------------------------------------
INotify Limits:
  max_queued_events    16384
  max_user_instances   128
  max_user_watches     524288
------------------------------------------------------------------------------
        Pid  App                        Watches   Instances
     2886516 fsnotifier                     24742   1
      110678 fsnotifier                     24740   1
      291730 node                           313   1
        1474 systemd (deleted)              130   4
     1508545 gsd-xsettings                   78   1
     1509036 xdg-desktop-portal-gtk          77   1
     1508426 gvfsd-trash                     47   1
     1508606 snap-store                      23   1
     2358356 nautilus                        18   1
     1508327 gnome-shell (deleted)           15   1
     1508721 tracker-miner-fs-3              11   1
     1508427 thunar                           9   1
     3113125 chrome (deleted)                 9   1
     1508303 gnome-session-binary             8   2
      125323 gnome-terminal-server            7   1
     1508495 evolution-alarm-notify (deleted)   7   1
      113058 code                             6   2
     1508118 dbus-daemon (deleted)            4   1
      110362 java                             4   1
      113422 code                             4   1
     1508906 gjs-console (deleted)            4   1
      113332 code                             4   1
     3113196 chrome (deleted)                 3   1
      111650 jcef_helper                      3   1
      113109 code                             3   1
      113392 code                             3   1
     1509341 seahorse                         2   1
     2116577 flameshot                        2   2
     1508356 evolution-source-registry (deleted)   2   1
     1508529 gsd-sound                        2   1
        1513 pulseaudio                       2   2
     3007946 gedit                            2   1
     1509017 xdg-desktop-portal               1   1
     1508381 goa-identity-service             1   1
     1508704 evolution-addressbook-factory (deleted)   1   1
     1508483 gsd-housekeeping                 1   1
     1508472 gsd-color                        1   1
     1508397 evolution-calendar-factory (deleted)   1   1
     1508389 gvfs-afc-volume-monitor          1   1
     1508370 gvfs-udisks2-volume-monitor      1   1
     1508365 goa-daemon                       1   1
     1508271 dbus-daemon (deleted)            1   1
      513523 node                             1   1
      113331 code                             1   1
        1511 pipewire-media-session           1   1
------------------------------------------------------------------------------
Total inotify Watches:   50297
Total inotify Instances: 52
------------------------------------------------------------------------------

The the overflowing text should probably be clipped on column width or the column width could be dynamically computed from the longest string in the app list to make room for even the longest one. Alternatively, one could just switch the columns around and have the App column as the last one, which would just avoid the entire issue :smile:


This was originally created as #4, but the fix that closed it only contained the padding fix for the PID column, so reposting the other half.