jaelpark / chamferwm

A tiling X11 window manager with Vulkan compositor.
https://jaelpark.github.io/chamferwm-docs/
BSD 3-Clause "New" or "Revised" License
249 stars 11 forks source link

Create a more basic shader/aestethic settings in config file #9

Closed rien333 closed 4 years ago

rien333 commented 4 years ago

The plan is probably to make the window look, feel and behavior configurable from the python config. For this purpose, it would probably be a good idea to create a shader look that is in between the current frame shader and the shader called default (the frame shader is pretty opinionated for a default look imo). A window border is pretty much a necessity, but shadows, rounderd corners, and dashed border lines aren't. The ability to set the frame border color is pretty much standard for a wm, however, especially for differentiating between focused and unfocused windows (this is something e.g. i3 and bspwm allow/do by default). It would also be nice to disable some animations by default. In other words, a more basic shader, that people can build upon to their liking, is probably a good idea.

I tried to combine the default and frame shader into one myself, but this proved a little too difficult for someone unfamiliar with shaders and vulkan. I haven't tried super hard, but currently it's difficult to see where the code for a basic window border starts, and what is relevant to eyecandy as rounded corners and dashed lines.

jaelpark commented 4 years ago

Most likely the python config won't provide much when it comes to the appearance of the windows. From the documentation:

The appearance of clients and their effects such as decorations, borders and shadows is fully controlled by either adjusting the parameters of the given default shaders, or by designing custom solutions by modifying existing or creating new shaders. Since the appearance of the clients can be completely arbitrary and is dictated by the shaders only, there are no style specific configuration options in the configuration script such as color, border width or anything that might not be relevant to a custom design. Instead, these are intended to be defined directly within the shader source.

But you're absolutely right about the default look, it's too opinionated as you described. It was something I originally came up with to test some of the more advanced customizations that might possibly be quite difficult to achieve with many of the existing window managers and compositors in the market. I was thinking to maybe provide a small number of "themes" for users to start with, starting from very basic (colored window borders with optional shadows) to some more advanced demonstrations for heavily customized appearance. The user would then have some shaders to choose and pull ideas from, frame1, frame2, ... maybe. The shaders also need more explanatory comments to guide the users.

I will probably work on something in coming days when I have more time again. For the animations it will be easy to add an on/off option for the python script.

rien333 commented 4 years ago

Cool, sounds good. For some reason I missed the documentation all together, it might be a good idea to make it somewhat more prominent in the README/somewhere else. Now it's hidden as a partial link at a location where other projects don't really provide interesting info.

jaelpark commented 4 years ago

I reworked the shaders, and included a basic colored border with sharp edges style. There's a preprocessor option now to choose whether to use the basic style or the other stock look which I'll be still using for testing. Hopefully the refactoring has also made the code easier to understand. I'll be further improving it again later on.