Normally in i3wm we use windows in tile mode. Floating windows are very archaic for me now, and I get easily lost if I have to use Windows, or desktop envs, where you use floating windows. However there are still usecases where floating windows are better, more useful.
Recently I decided to read ebooks on my computer, however I have a widescreen monitor with 1920*1080 resolution. It's too wide for reading. So I decided I need a floating window for my ebook reader. This is how I done it.
As always we need to open our i3 config file. For me it's the ~/.config/i3/config file.
1. Enable floating
For that we have to no the class or instance name of the program. We need to run xprop and click on the program's window and look for either class or instance. After that we past this line.
for_window [class="Lector"] floating enable
2. Resizing window
It'd nicer to have a set size for that window, and we can use resize set for that. The size is in pixels of course.
for_window [class="Lector"] resize set 840 980
Don't forget to set your keybind for starting that program, and optionally set the workspace you want to start that program.