Bug 418015 - Add shortcut: move window to corner
Summary: Add shortcut: move window to corner
Status: RESOLVED DOWNSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: 5.17.5
Platform: Manjaro Linux
: NOR wishlist
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-21 22:57 UTC by Kristen McWilliam
Modified: 2024-03-19 20:43 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kristen McWilliam 2020-02-21 22:57:46 UTC
SUMMARY

Feature Request: Add a Global Shortcut for moving windows into the corner of the display


* * *

Currently I use 'Pack Window' Down/Left/Right/Up to move windows around the screen, however I often wish to place a window in the corner of the monitor.

Example:
If I want my window in the bottom-left corner, I have to do `Pack Window to the Left` + `Pack Window Down`. I would much prefer to have a shortcut for something like `Pack Window Bottom-Left` that I could assign to a single hotkey.



KDE Plasma Version: 5.17.5
KDE Frameworks Version: 5.66.0
Qt Version: 5.14.1
Comment 1 Kristen McWilliam 2020-02-21 23:00:55 UTC
I should add I am aware of the `Quick Tile` shortcuts that are available, but I am specifically looking for a solution that does __not__ change the window size.
Comment 2 Kristen McWilliam 2020-02-25 14:04:25 UTC
I found what looks like the relevant code section;

```
void Workspace::slotWindowPackLeft()
{
    if (active_client && active_client->isMovable())
        active_client->packTo(packPositionLeft(active_client, active_client->frameGeometry().left(), true),
                              active_client->y());
}
```

I think even though I am not a programmer I could cobble together a solution myself from this example with some trial and error, but figuring out the KDE dev environment & how the git system here works, etc is proving a bit confusing, the userbase articles and/or github instructions seems to take some knowledge for granted.
Comment 3 Nate Graham 2020-02-25 14:16:26 UTC
Here's the documentation: https://community.kde.org/Get_Involved/development

Please don't hesitate to ask for help if anything's confusing--and then also edit the wiki page to be clearer. :)
Comment 4 Vlad Zahorodnii 2021-09-13 07:12:34 UTC
Can other pack modes be implemented in a kwin script?
Comment 5 Bug Janitor Service 2021-09-29 17:14:00 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/1478
Comment 6 Kristen McWilliam 2024-03-19 20:43:35 UTC
This was implemented by the requester as a KWin script: https://store.kde.org/p/1702170