Start Alacritty with Override Options

10.2k views Asked by At

I'm trying to use Alacritty with some custom startup overrides. Annoyingly, setting the window size does not work. It just silently ignores it. It always opens at the same size (100x35). Note that I have not set these settings in alacritty.yml.

alacritty -o "window.dimensions.columns=100"

But some settings, like the startup mode, do work.

alacritty -o "window.startup_mode=Fullscreen"

Also, if I deliberately put a typo in the dimensions override ("dimensionnns"), there are no errors or changes.

alacritty -o "window.dimensionnns.columns=100"

Trying to set window.dimensions.rows does nothing as well.

Any help would be greatly appreciated! I'd love to be able to automate Alacritty's size for different projects.

3

There are 3 answers

0
whoisYoges On

I found out that you'll need to specify both the columns and lines numbers so the proper command would be like: alacritty -o "window.dimensions.lines=15" -o "window.dimensions.columns=60"

Remember: both the lines and columns number must be non-zero and positive.

3
Stephen On

Try this in ~/.config/alacritty/alacritty.yml

window:
   dimensions:
     columns: 133
     lines: 40
 

Reference. https://github.com/tmcdonell/config-alacritty/blob/master/alacritty.yml

I struggle with this too. Be aware yml formatting is very picky as you may already know. This config works for me on Arch running GNOME40.

0
mab On

Just change "window.dimensions.rows=40" to "window.dimensions.lines=40" and it will work then.