dylanaraps / neofetch

🖼️ A command-line system information tool written in bash 3.2+
MIT License
21.66k stars 1.74k forks source link

Space between image and info in latest iTerm2 versions #1644

Open njenan opened 3 years ago

njenan commented 3 years ago

Description

In the latest iterm2 versions (v3.4.0+) there is a large amount of space between the image and the info. See screenshots for example. This is not an issue in iterm2 v3.3.12, which displays a smaller gap between the image and the info. The same neofetch configuration was used for both examples below.

Neofetch version

Neofetch 7.1.0

Running on OS X Catalina 10.15.7

Screenshot

With iterm2 v3.4.0

Screen Shot 2020-12-29 at 9 05 59 PM

With iterm2 v3.3.12

Screen Shot 2020-12-29 at 9 07 19 PM

Config file

https://gist.github.com/njenan/6ea9a2d93b210a627badc49b1224bfd2

Verbose log

  1. Run neofetch -vv 2> neofetchlog
  2. Upload the contents of neofetchlog to pastebin, gist or equivalent.

iterm2 v3.3.12 neofetch logs: https://gist.github.com/njenan/216534f7e4451229c0f435672afc61d7

iterm2 v3.4.0 neofetch logs: https://gist.github.com/njenan/81f6adf222ba70aef757643aa686c132

marsxxl commented 3 years ago

Same problem

iTerm2 Version: Build 3.4.3 Neofetch 7.1.0 CleanShot 2021-01-15 at 11 05 57@2x

goxofy commented 3 years ago

same problem

image

o-y commented 3 years ago

in lieu of any traction on this bug; there is a workaround that can be achieved by toggling some flags in the iTerm settings.

image

dylanaraps commented 3 years ago

Screenshots are really pretty but verbose logs (like in the first post) would be great.

dylanaraps commented 3 years ago

Neofetch is functioning identically (finding same terminal size) in both iterm2 versions.

I believe neofetch needs to return the retina resolution for screen size on macOS (we need to detect when retina is used too(?)). But, this may break prior iterm2 versions (where this same code has worked fine for years).

Maybe look at iterm2 and what changed between versions to cause the breakage over here. Maybe also look at their image documentation to see if we're doing anything wrong (possibly also how to handle retina on the application side).

Kagameow commented 3 years ago

Got the same problem image Maybe my logs can be useful https://gist.github.com/Kagameow/206383a556cb6528c2b034fa9a5a1066

aakash-dusane commented 3 years ago

in lieu of any traction on this bug; there is a workaround that can be achieved by toggling some flags in the iTerm settings.

  • Navigate to Preferences > Advanced
  • Search for: Disable potentially insecure escape sequences and set to false
  • Search for: Show inline images at retina resolution and set to false

image

This Worked for me!

Azlx commented 2 years ago

in lieu of any traction on this bug; there is a workaround that can be achieved by toggling some flags in the iTerm settings.

  • Navigate to Preferences > Advanced
  • Search for: Disable potentially insecure escape sequences and set to false
  • Search for: Show inline images at retina resolution and set to false

image

This problem still exists after setting up async:

image

image

Gex2501 commented 2 years ago

in lieu of any traction on this bug; there is a workaround that can be achieved by toggling some flags in the iTerm settings.

  • Navigate to Preferences > Advanced
  • Search for: Disable potentially insecure escape sequences and set to false
  • Search for: Show inline images at retina resolution and set to false

So I have encountered the same issue with the following versions of software below. Setting the 'show inline images at retina resolutions to NO seems to resolve the problem. However, maybe this is a workaround at best and the issue needs further addressing? I'm including my verbose logs to hopefully help with this.

MacOS: 12.1 | iTerm2: 3.4.14 | Neofetch: 7.1.0

https://github.com/Gex2501/neofetch-logs

plsnotracking commented 2 years ago

The display issue still shows up when the commands are used in an async fashion

Here's my config without async stuff:

# See this wiki page for more info:
# https://github.com/dylanaraps/neofetch/wiki/Customizing-Info
print_info() {
    info title
    info underline

    info "OS" distro
    info "Host" model
    info "Kernel" kernel
    info "Uptime" uptime
    info "Packages" packages
    info "Shell" shell
    info "Resolution" resolution
    info "DE" de
    info "WM" wm
    info "WM Theme" wm_theme
    info "Theme" theme
    info "Icons" icons
    info "Terminal" term
    info "Terminal Font" term_font
    info "CPU" cpu
    info "GPU" gpu
    info "Memory" memory
    # info "CPU Usage" cpu_usage &
    # info "Disk" disk &
    # info "Battery" battery &
    # info "GPU Driver" gpu_driver & # Linux/macOS only
    # info "Font" font
    # info "Song" song
    # [[ "$player" ]] && prin "Music Player" "$player"
    # info "Local IP" local_ip &
    # info "Public IP" public_ip &
    # info "Users" users
    # info "Locale" locale  # This only works on glibc systems.

    # Wait for the functions to complete
    # wait

    info cols
}
...

Here's the log without async stuff: out.log

Here's my config WITH async stuff:

# See this wiki page for more info:
# https://github.com/dylanaraps/neofetch/wiki/Customizing-Info
print_info() {
    info title
    info underline

    info "OS" distro &
    info "Host" model &
    info "Kernel" kernel &
    info "Uptime" uptime &
    info "Packages" packages &
    info "Shell" shell &
    info "Resolution" resolution &
    info "DE" de &
    info "WM" wm &
    info "WM Theme" wm_theme &
    info "Theme" theme &
    info "Icons" icons &
    info "Terminal" term &
    info "Terminal Font" term_font &
    info "CPU" cpu &
    info "GPU" gpu &
    info "Memory" memory &
    # info "CPU Usage" cpu_usage &
    # info "Disk" disk &
    # info "Battery" battery &
    # info "GPU Driver" gpu_driver & # Linux/macOS only
    # info "Font" font
    # info "Song" song
    # [[ "$player" ]] && prin "Music Player" "$player"
    # info "Local IP" local_ip &
    # info "Public IP" public_ip &
    # info "Users" users
    # info "Locale" locale  # This only works on glibc systems.

    # Wait for the functions to complete
    wait

    info cols
}

Here's the log WITH all the async stuff: out.log

Please let me know if I'm missing something, thank you.

sephymartin commented 1 year ago

Same problem

iTerm2 Version: Build 3.4.3 Neofetch 7.1.0 CleanShot 2021-01-15 at 11 05 57@2x

I replaced neofetch to fastfetch and problem solved.

image
plsnotracking commented 1 year ago

@sephymartin I don't think this issue has been addressed, I switched to fastfetch (I see you switched to that too). Although I'm interested in the AppleSilicon logo, is this something you picked up from the Apple website or do you have the ascii art? Thanks.

sephymartin commented 1 year ago

@sephymartin I don't think this issue has been addressed, I switched to fastfetch (I see you switched to that too). Although I'm interested in the AppleSilicon logo, is this something you picked up from the Apple website or do you have the ascii art? Thanks.

I got this pic from Apple website. link. And this is my fastfetch config

--logo-type "iterm"
--logo "path/to/the/pic/on/your/mac" 
--logo-width "55" 
--logo-height "25"
TimeTravelPenguin commented 2 months ago

I was fiddling with the advanced settings in iTerm2 and I found that there is one particular setting, Show inline images at Retina resolution, which seems to affect how images scales. See the following comparisons:

Show inline images at Retina resolution: Yes (Default)

CleanShot 2024-04-26 at 23 17 04@2x

Show inline images at Retina resolution: No

CleanShot 2024-04-26 at 23 19 35@2x