lucmos / lucmos/UltrawideWindows
Introduce gaps between windows.
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 218
- Forks
- 39
- PR merge metrics
- No merged PRs in 30d
Description
I really love your script, but in my case I had to introduce small gaps between windows. Here is a patched function. It would be nice if this feature is configurable.
```
function newSlotPosition(workspace, client, numberXslots, numberYslots, x, y, xSlotToFill, ySlotToFill) {
var maxArea = workspace.clientArea(KWin.MaximizeArea, client);
var newX = maxArea.x + Math.round(maxArea.width / numberXslots * x) + 8;
var newY = maxArea.y + Math.round(maxArea.height / numberYslots * y) + 8;
var gapX = x + xSlotToFill < numberXslots ? 8 : 0;
var gapY = y + ySlotToFill < numberYslots ? 8 : 0;
// Width and height is calculated by finding where the window should end and subtracting where it should start
var clientWidth = Math.round(maxArea.width / numberXslots * (x + xSlotToFill)) - (newX - maxArea.x) - 8 + gapX;
var clientHeight = Math.round(maxArea.height / numberYslots * (y + ySlotToFill)) - (newY - maxArea.y) - 8 + gapY;
return [newX, newY, clientWidth, clientHeight]
}
```
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the newSlotPosition function in the KWin script and reading how workspace and window-slot geometry are calculated. Check how script settings are defined, then verify that a configurable gap is applied between windows while edge gaps remain correct.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- desktop
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100