KWin script to resize and move windows. Like Spectacle/Rectangle on mac.
## Installation
Available in the [KDE store](https://store.kde.org/p/1492899/) After installation, set up using System Settings > Shortcuts > KWin as pictured here ( https://raw.githubusercontent.com/davidosomething/yanjing/19b8703b114f26306d32db285d23db6d90e78a44/meta/setup.png )
## Commands
- Yanjing LEFT - `no default` - Vertically maximize, flush the window to the LEFT side of the screen, or resize width if already flushed. - Yanjing CENTER - `no default` - Vertically maximize, center window horizontally, or resize width if already centered. Centering allows a 2px margin of error. - Yanjing RIGHT - `no default` - Vertically maximize, flush the window to the RIGHT side of the screen, or resize width if already flushed. - Yanjing yMax + LEFT - `ctrl-shift-meta-a` - Vertically maximize, flush the window to the LEFT side of the screen, or resize width if already flushed. - Yanjing yMax + CENTER - `ctrl-shift-meta-x` - - Vertically maximize, center window horizontally, or resize width if already centered. Centering allows a 2px margin of error. - Yanjing yMax + RIGHT - `ctrl-shift-meta-d` - Vertically maximize, flush the window to the RIGHT side of the screen, or resize width if already flushed.
### Resizing logic
The window will steps through the [Sizes array](./contents/code/main.js). It does so in reverse order, so as you "shove" the window against each edge of the screen or into the center more, it shrinks. It will loop back to the largest size.
Ratings & Comments
0 Comments