mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-04-11 03:27:08 +02:00
This commit adds the transparency manager module, which, when enabled, will make unfocused windows transparent using a user-configurable alpha value between 0-255. The corresponding komorebic commands (transparency, transparency-alpha) have been added, as well as the corresponding static configuration values (transparency, transparency_alpha). This feature is off-by-default and must be explicitly enabled by the user. If the process is not shut down cleanly via the 'komorebic stop' command, it is possible that the user will be left with transparent windows which will not be managed by komorebi the next time it launches. This is because the WS_EX_LAYERED style is required for transparency, but is ignored by default in komorebi's window eligibility heuristics. For this reason, a separate state tracker of windows that have had this style added by the window manager is kept in the transparency manager module. For this edge case of shutdowns where the cleanup logic cannot be run, the 'komorebic restore-windows' command has been updated to remove transparency from all windows that were known to the window manager during the last session before it was killed. This must be run _before_ restarting komorebi, so that the previous session's known window data is not overwritten. In the worst case scenario that the previous session's data is overwritten, the user will have to either kill and restart the applications, or compile komorebi from source and explicitly set "allow_layered" to "true" in the window_is_eligible function, before setting the transparency alpha to 255 (fully opaque), and then resetting to the desired value.