
Source (link to git-repo or to original if based on someone elses unmodified work): https://github.com/davidosomething/yanjing
# Yanjing
KWin script to resize and move windows. Like Spectacle/Rectangle on mac.
## Installation
Available in the [KDE store](https://store.kde.org/p/1492899/)
## Configuration
You can customize the sizes this script cycles through by setting them in your
kwin config using this command:
```sh
kwriteconfig5 --file kwinrc --group Script-yanjing --key sizes "50,66,34,100"
qdbus org.kde.KWin /KWin reconfigure
```
This will write the sizes to your `~/.config/kwinrc` file under the
`[Script-yanjing]` group.
You may need to disable and re-enable the plugin in
`System Settings > KWin Scripts` for the sizes to be read.
## 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.
## License
MIT
v5.0.0 8 days ago
Support reading settings from ~/.config/kwinrc -- see description or readme in git repo for config instructions
v5.0.0 8 days ago
Support reading settings from ~/.config/kwinrc -- see description or readme in git repo for config instructions
v4.1.0 Fixes, unmaximization, and release scripting updates 11 days ago
- fix doc types
- fix npm start script to call kwin:* scripts
- unmax window before move so we get window decorations
- fix test cases where moveable was incorrectly mocked
- test squish
- fix npm version tagging, will add and commit the generated files to tag now
v4.1.0 Fixes, unmaximization, and release scripting updates 11 days ago
- fix doc types
- fix npm start script to call kwin:* scripts
- unmax window before move so we get window decorations
- fix test cases where moveable was incorrectly mocked
- test squish
- fix npm version tagging, will add and commit the generated files to tag now
v4.0.0 - Respect left and right sidebars 12 days ago
Respects left and right sidebars now
v3.0.0 13 days ago
- Return states in all fns
- Add more jsdoc
- squish() takes client now
- Add yMax to fake maximize vertically in work area
- Re-assign defaults -- now vertical max is default shortcut
- Update tests for ymax variants
Added centering 28 days ago
Added centering, tests, fix init
xvello
8 days ago
Report