mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-06-11 16:57:43 +00:00
Introduce a declarative KWin script that maintains a binary-space partition layout per output for normal windows in convergence mode. New windows are added to the active screen and the layout is recomputed with 8 px outer and 8 px inner gaps; closed windows are removed and neighbours expand to fill the freed area. Windows that fail isTileable (panels, fixed-size dialogs, fullscreen, xwaylandvideobridge, manually-floated) are left untouched. A 200 ms deferred-retile timer mirrors the convergentwindows pattern so the dockSpaceReserver layer-shell exclusive zone is settled before clientArea is queried. Dragging a tile and dropping it onto another tile swaps the two slots in the BSP layout; an outline is drawn on the hovered target as a visual cue. Drops elsewhere snap the tile back to its original slot and leave KWin native quick-tile and electric borders untouched. Keyboard bindings: Meta+H/J/K/L focus left/down/up/right Meta+F toggle float on the active window Meta+T toggle tiling globally
14 lines
530 B
CMake
14 lines
530 B
CMake
# SPDX-FileCopyrightText: 2023 Devin Lin <devin@kde.org>
|
|
# SPDX-License-Identifier: LGPL-2.1-or-later
|
|
|
|
function(add_kwin_script name source)
|
|
kpackage_install_package(${source} ${name} scripts kwin)
|
|
|
|
# Copy the script to the build directory so one can run tests without prior
|
|
# make install.
|
|
file(COPY ${source}/contents ${source}/metadata.json DESTINATION ${CMAKE_BINARY_DIR}/bin/kwin/scripts/${name})
|
|
endfunction()
|
|
|
|
add_kwin_script(convergentwindows convergentwindows)
|
|
add_kwin_script(shift-tiling shift-tiling)
|
|
|