deprecated
for_window [class="^.*"] border pixel 1
new_window 1pixel
thanks to deviatorslegacy's comment
Document here:
https://i3wm.org/docs/userguide.html#_default_border_style_for_new_windows
New way to do it:
default_border pixel 1
default_floating_border pixel 1
Additionally, I could assign color to border when window focus is changed. https://i3wm.org/docs/userguide.html#_changing_colors
Not directly. It is possible in a fairly easy manner though.
My solution was to set the font to 0 in ~/.config/i3/config . Then just toggle font on and off with this script (since sometimes I do want the titlebar to be there). You need of course to match the font line with your own:
This leaves a 4px border (I read in another post which Airblader answered) This can easily be removed from the source code. A super simple patch which I just put inside my patches folder in Gentoo:
/etc/portage/patches/x11-wm/i3-gaps/remove-win-decor.patch :