alacritty / alacritty

A cross-platform, OpenGL terminal emulator.
https://alacritty.org
Apache License 2.0
56.11k stars 3.01k forks source link

How to remove the bottom gap in Alacritty? #6113

Closed ronylee11 closed 2 years ago

ronylee11 commented 2 years ago

Hi, I have this issue of bottom gap when i run alacritty in monocle mode in dwm, which automatically resizes it to maximized, but it doesn't appear on tiling mode, when it is resized to be slightly smaller, i have read #1816 which seems to be my problem, went further reading #1780 and #388, tried setting dynamic_window to true but still doesn't fix it, instead gaps are added at all sides which makes it even worse How can i solve this issue? I could not recreate this issue in st (simple terminal) and kitty, pretty sure its an alacritty-related one

Problems: 06-06-2022-12:34:44-screenshot 06-06-2022-12:35:04-screenshot\

Expectation: 06-06-2022-12:50:35-screenshot 06-06-2022-12:50:41-screenshot

System

OS: Arch Linux Version: `alacritty 0.10.1 () Linux/BSD: X11, xcompmgr, dwm

Logs

Font/Terminal size:

[~] : alacritty -vv
Created log file at "/tmp/Alacritty-122066.log" [0.000004819s] [INFO ] [alacritty] Welcome to Alacritty [0.000041067s] [INFO ] [alacritty] Version 0.10.1 () [0.000050984s] [INFO ] [alacritty] Running on X11 [0.000413252s] [INFO ] [alacritty] Configuration files loaded from: "/home/cleff/.config/alacritty/alacritty.yml" [0.009559763s] [DEBUG] [crossfont] Loaded Face Face { ft_face: Font Face: Regular, load_flags: TARGET_LIGHT, render_mode: "Normal", lcd_filter: 1 } [0.011269203s] [DEBUG] [alacritty] Estimated DPR: 1.6666666666666667 [0.011290435s] [DEBUG] [alacritty] Estimated window size: None [0.011295184s] [DEBUG] [alacritty] Estimated cell size: 14 x 28 [0.056314170s] [INFO ] [alacritty] Device pixel ratio: 1.6666666666666667 [0.060716767s] [INFO ] [alacritty] Initializing glyph cache... [0.062382836s] [DEBUG] [crossfont] Loaded Face Face { ft_face: Font Face: Regular, load_flags: TARGET_LIGHT, render_mode: "Normal", lcd_filter: 1 } [0.064983105s] [DEBUG] [crossfont] Loaded Face Face { ft_face: Font Face: Bold, load_flags: TARGET_LIGHT, render_mode: "Normal", lcd_filter: 1 } [0.067428744s] [DEBUG] [crossfont] Loaded Face Face { ft_face: Font Face: Italic, load_flags: TARGET_LIGHT, render_mode: "Normal", lcd_filter: 1 } [0.071213664s] [DEBUG] [crossfont] Loaded Face Face { ft_face: Font Face: Bold Italic, load_flags: TARGET_LIGHT, render_mode: "Normal", lcd_filter: 1 } [0.081788783s] [INFO ] [alacritty] ... finished initializing glyph cache in 0.021038701s [0.081917361s] [INFO ] [alacritty] Cell size: 14 x 28 [0.081924135s] [INFO ] [alacritty] Padding: 0 x 0 [0.081929373s] [INFO ] [alacritty] Width: 800, Height: 600 [0.085236228s] [INFO ] [alacritty] PTY dimensions: 21 x 57 [0.088645401s] [INFO ] [alacritty] Initialisation complete [0.092690271s] [DEBUG] [alacritty_terminal] New num_cols is 137 and num_lines is 38 [0.093705766s] [INFO ] [alacritty] Padding: 0 x 0 [0.093747671s] [INFO ] [alacritty] Width: 1920, Height: 1080 [3.624146831s] [INFO ] [alacritty] Goodbye Deleted log file at "/tmp/Alacritty-122066.log"

chrisduerr commented 2 years ago

How can i solve this issue?

You don't.

ronylee11 commented 2 years ago

Here's the full view of my nvim, as u can see there is quite a big chunk of white line at the bottom 06-06-2022-18:13:23-screenshot

ronylee11 commented 2 years ago

How can i solve this issue?

You don't.

What do you mean? So I have to just cope with the issue and live with it?

kchibisov commented 2 years ago

That's padding, it's expected and present in any other terminal. You can use dynamic_padding option to justify it.

ronylee11 commented 2 years ago

I managed to solved it by changing offset x to 1, offset y to 0, dimensions, padding, position all to 0, and dynamic_padding to true. Thanks for the hint!

kchibisov commented 2 years ago

Yeah, but as soon as you resize you'll see it again...

luanbt21 commented 1 year ago

I set decorations: none and it works as expected.

vnva commented 8 months ago
-- Alacritty

local alacrittyAutoGroup = vim.api.nvim_create_augroup('alacritty', { clear = true })

vim.api.nvim_create_autocmd('VimEnter', {
  group = alacrittyAutoGroup,
  callback = function()
    vim.fn.system(
      "alacritty msg --socket $ALACRITTY_SOCKET config -w $ALACRITTY_WINDOW_ID options 'window.padding.x=0' 'window.padding.y=0' 'window.dynamic_padding=false'"
    )
  end,
})

vim.api.nvim_create_autocmd('VimLeavePre', {
  group = alacrittyAutoGroup,
  callback = function()
    vim.fn.jobstart('alacritty msg --socket $ALACRITTY_SOCKET config -w $ALACRITTY_WINDOW_ID -r', { detach = true })
  end,
})
nixpulvis commented 8 months ago

@vnva sick script. Curious what program uses it?

vnva commented 8 months ago

@nixpulvis neovim.

samialdury commented 4 months ago

These settings fixed it for me with JetBrains Mono NL Nerd Font:

[font.offset]
x = 0
y = 1

along with:

[window]
decorations = "None"

[window.padding]
x = 0
y = 0