Sticky Window Snapping Original

Kwin Scripts

Source (link to git-repo or to original if based on someone elses unmodified work): https://github.com/Flupp/sticky-window-snapping

15
7.9
Description:

KWin script to let snapped window edges stick together when one window is resized.

The script provides an easy to use configuration dialog, which can be reached via “systemsettings”. (However, note section “Bugs and Workarounds”.)

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”.

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.
Last changelog:

v1.0 11 months ago

new:

  • configuration dialog
  • configurable transparency of unaffected windows
  • configurable threshold defining a maximal distance to consider edges as snapped
  • option to ignore maximized windows
  • option to ignore window edges that touch an edge of the screen
  • restore affected minimized windows temporarily
changed:
  • highlight a snapped window only when its size is changed
  • also consider windows that are on all desktops
  • delay transparency changes until first resize step to prevent flickering
  • do not restrict a window to the client area (typically the screen size) if it already exceeds it
fixed:
  • crash on resize when a snapped window disappears

Contrast

6 years ago

Great idea. Good to see you're still active. I noticed the relative lack of commits to this project - https://bitbucket.org/flupp/smooth-tasks-fork/ - and thought you might have moved away from KDE. By the way, is that project more or less "dead?" I only ask because it was my favorite task manager widget, but this issue - https://bitbucket.org/flupp/smooth-tasks-fork/issue/22/custumizable-alignement-and-order-of-task made it unusable for me. (Sorry for the off-topic comment.)

Report

herrbatka

6 years ago

As I wrote It is awesome, but I see one small problem. This script should have a one additional check to not work on window that overlaps resized window.

BTW: I consider resizing column and row as a feature.

Report

herrbatka

6 years ago

Insanly good idea!

Report

C

Flupp

6 years ago

Thank you.

Report

v1.0 11 months ago

new:

  • configuration dialog
  • configurable transparency of unaffected windows
  • configurable threshold defining a maximal distance to consider edges as snapped
  • option to ignore maximized windows
  • option to ignore window edges that touch an edge of the screen
  • restore affected minimized windows temporarily
changed:
  • highlight a snapped window only when its size is changed
  • also consider windows that are on all desktops
  • delay transparency changes until first resize step to prevent flickering
  • do not restrict a window to the client area (typically the screen size) if it already exceeds it
fixed:
  • crash on resize when a snapped window disappears

v0.2.1 11 months ago

  • fixed resizing for windows spanning multiple screens

v0.2 11 months ago

  • maximized windows are ignored now
  • shaded windows are ignored now
  • windows on other screens are ignored now
  • changed behavior when windows get very small while resizing

v0.1 11 months ago

  • initial release

12345678910
271
product-maker eptin May 19 2019 10 the best
10 the best
product-maker roachsinai Apr 02 2019 8 great
+
product-maker duncanyoyo1 Feb 27 2019 8 great
+
product-maker jontheburger Feb 17 2019 8 great
+
product-maker molecule-eye Feb 08 2019 8 great
+ This is awesome and should be incorporated into kwin and maintained upstream!
product-maker m0ji Feb 06 2019 8 great
+
product-maker chickenff Dec 11 2018 8 great
fantastic
product-maker moonchild19 Nov 21 2018 8 great
+Very useful!!
product-maker brazzmonkey Nov 08 2018 8 great
Rendering seems to lag a little, but the extra functionality is awesome. This should be offered in KWin by default.
product-maker kuriot Oct 07 2018 8 great
+
product-maker L0sted Jun 29 2018 8 great
+
product-maker sh4nks Jan 04 2018 8 great
product-maker KIMW Jun 16 2017 8 great
product-maker Zren May 01 2017 8 great
product-maker chips Sep 04 2016 8 great
product-maker qtnerd Aug 14 2016 8 great
product-maker lboklin Jan 03 2016 8 great
product-maker mirkogennari Oct 07 2015 8 great
product-maker mcaceres Oct 03 2014 8 great
product-maker jospoortvliet_double Sep 23 2014 8 great
product-maker SeaJey Oct 31 2013 8 great
product-maker jaitrum Oct 31 2013 8 great
product-maker deabru Oct 30 2013 8 great
product-maker saabzero Jun 27 2013 8 great
product-maker Henri Apr 15 2013 8 great
product-maker Contrast Mar 09 2013 8 great
product-maker Hmpf Mar 09 2013 8 great
product-maker herrbatka Mar 09 2013 8 great
product-maker Count:2 Rating: 5.00
File (click to download) Version Description Downloads Date Filesize DL OCS-Install
Pling
*Needs ocs-url or ocs-store to install things
Details
license
GPLv2 only
version
1.0
updated May 27 2018
added Mar 09 2013
downloads today
34
page views today 53
+