[p]KWin script to let snapped window edges stick together when one window is resized.[/p][p]The script provides an easy to use configuration dialog, which can be reached via “systemsettings”. (However, note section “Bugs and Workarounds”.)[/p][p]Additionally, the script registers two global shortcuts: one for enabling/disabling the script permanently, and one for enabling/disabling the script only for the next resize. The default shortcut keys are Meta+Shift+S and Ctrl+Shift+S, respectively. You can change them using “systemsettings” (or “kcmshell4 keys”); they are associated with the component “KWin”. Their names are prefixed by “KWin Script: Sticky Window Snapping”.[/p]
Bugs and Workarounds
- If the configuration dialog is not reachable via “systemsettings”, then try the following command and restart “systemsettings”: ln --relative --symbolic ~/.local/share/kwin/scripts/sticky-window-snapping/metadata.desktop ~/.local/share/kservices5/kwin-script-sticky-window-snapping.desktop
- If the script does not work, increasing the threshold in the configuration dialog might help.
Known issues
- There is no optical feedback when a shortcut is pressed. I do not know how to initiate a KNotify notification from a KWin script. There is the function “callDBus”, but I do not know if or how it can be used for that purpose. KNotify provides the method “event” via D-Bus, but it expects arguments of types for which I do not know how to produce values with JavaScript.
- Currently, not only snapped window edges are considered as connected, but even edges which are only on the same row/column are considered as connected. I have not decided, if this is a bug or a feature, yet.
m0ji
3 months ago
Report
aliases01
5 months ago
sudo ln --symbolic /home//.local/share/kwin/scripts/sticky-window-snapping/metadata.desktop /usr/share/kservices5/kwin-script-sticky-window-snapping.desktop
It's a bit dirty und i guess it will cause problems if the users home folder is removed but at least it works.
Report
aliases01
5 months ago
Use the solution described there, it's way cleaner.
Report
azarilh
7 months ago
https://bugs.kde.org/show_bug.cgi?id=422202
Report
Flupp
7 months ago
Report
azarilh
7 months ago
Report
patrolez
9 months ago
Report
gcjuan
9 months ago
Report
vit-skalicky
9 months ago
Should be in plasma by default. Even windows has something similar (but less powerful)
Report
datamaskinen
1 year ago
mkdir ~/.local/share/kservices5
ln --relative --symbolic ~/.local/share/kwin/scripts/sticky-window-snapping/metadata.desktop ~/.local/share/kservices5/kwin-script-sticky-window-snapping.desktop
Report
alex1701c
1 year ago
Report
kaetir
1 year ago
Report
pyro226
1 year ago
Report
eptin
1 year ago
Report
eptin
1 year ago
Report
roachsinai
1 year ago
Report
duncanyoyo1
1 year ago
Report
jontheburger
1 year ago
Report
molecule-eye
1 year ago
Report
Flupp
1 year ago
Report
molecule-eye
1 year ago
Report
Flupp
1 year ago
• If the configuration dialog is not reachable via “systemsettings”, then try the following command and restart “systemsettings”:
ln --relative --symbolic ~/.local/share/kwin/scripts/sticky-window-snapping/metadata.desktop ~/.local/share/kservices5/kwin-script-sticky-window-snapping.desktop
Report
molecule-eye
1 year ago
Report
chickenff
2 years ago
Report
leggettc18
2 years ago
Report