Video in which I make the POC of this project: https://youtu.be/cuPirXZ6AWo
After building, run the executable lightwm.exe
which will reside in the release and/or debug folder, depending on what you built.
Upon running, it will immediately tile all the non-minimized windows on your screen.
The program will run in the background. To quit LightWM, use alt+q
.
You can use alt+j
and alt+k
to go to the next/previous window with your keyboard.
You can use alt+f
hotkey to toggle focus mode which will disable tiling and put the focused window in fullscreen, pressing alt+f
again will enable tiling again and tile all non-minimized windows
You can build using the "x64 Native Tools Command Prompt for VS 2022" that comes with Microsoft Visual Studio Build Tools:
In the console you can run nmake to build according to the Makefile
nmake
I haven't tried building with a different VS version or building x86, but that may work as well.
- Add support for workspaces (maintain a list of maximized windows for each workspace)
Functions and variables should be in camelCase
In general comments should be avoided unless they are absolutely necessary
Avoid adding obvious comments on the code like:
// Prints hello on the screen
printf("Hello!\n");
Avoid comments explaining the logic in other words:
// Allocate memory for the string and for the null terminator
malloc(1024 + 1);
Instead something like this is much better:
const int nullTermSize = 1;
malloc(strlen(path) + nullTermSize);
Example of when a comment is necessary and has added value:
// This DLL is loaded into many processes on the computer, therefore we need to keep the logic here as simple as possible to avoid slowing down the system
int*
and not int *
Opening braces { in the same line as the block definition
if (cond) {
}
and not:
if (cond)
{
}
Opening braces { in a new line after the function definition
void init()
{
}
and not:
void init() {
}
Space between the block name and the brackets
if (statement)
and not if(statement)