Commit graph

13 commits

Author SHA1 Message Date
Aqa-Ib
2b6ff6837e
groups: add group_on_movetoworkspace (#8159) 2024-10-23 00:51:25 +01:00
Mike Will
4093b993a2
input: add snapping to floating windows (#8088)
* add snapping to floating windows

Works for both moving and resizing of windows.
It comes with 3 options:

`general:snap:enabled` - whether it's enabled, off by default

`general:snap:window_gap` - minimum gap in pixels between windows before
snapping. Setting to 0 effectively turns off this method of snapping.

`general:snap:monitor_gap` - minimum gap in pixels between window and
monitor edges before snapping. Again, setting it to 0 effectively turns
it off.

* snap: add more ignore criteria and change if clause into a guard

* snap: refactor code

* snap: new refactoring approach and account for border size

* snap: do corner snapping after all edge snapping is done

The approach of performing corner snaps after each individual edge snap
results in far fewer scenarios where snapping can occur.

After trying it out for a while, I found that I prefer an approach
that's more prone to snapping.

* snap: combine snapWindows and snapMonitor into a single function

* snap: add forced aspect ratio functionality

* snap: avoid directly referring to border_size config value

* snap: address vaxerski feedback

- add new line between functions
- use std::function typedef for SnapFn and make snap functions static
- avoid uninitialized variable declarations.
- change ignore condition m_bIsX11 to isX11OverrideRedirect()
- use braces for CBox and Vector2D declarations.
- add SNAP_INVALID to eSnapEdge enum
- use bitshift notation for eSnapEdge and eRectCorner
- make performSnap a non-member function.

* snap: add corner-snapping to forced aspect ratio mode
2024-10-21 16:08:25 +01:00
Vaxry
d655a10381
config/layout: nuke no_gaps_when_only (#8072) 2024-10-11 10:56:19 +01:00
Aqa-Ib
6ae89940c7
layout: add merge_floated_into_tiled_on_groupbar (#8042) 2024-10-09 10:58:49 +01:00
Aqa-Ib
45e82199fb
layout: add drag_into_group to control merging dragging windows (#8004) 2024-10-08 11:20:41 +01:00
Aqa-Ib
e2426942e5
layout: add auto_group to control default grouping (#7883) 2024-10-02 10:22:19 +01:00
Mike Will
9e418671e1
config: add descriptions for dwindle and master layout options (#7933) 2024-09-29 14:42:10 +01:00
883d01084c userchecks: add an xdg_current_desktop check
ref https://github.com/hyprwm/xdg-desktop-portal-hyprland/issues/251

if the XDG_CURRENT_DESKTOP is externally managed (e.g. DE, DM, etc) Hyprland will not overwrite it. In those cases, if that's undesired, portals and other apps depending on it might break.
2024-09-18 11:22:12 +01:00
Parola Marco
4a42c5ed20
config: Add a variable to prevent groups from merging after being dragged (#7650)
* config: Add a variable to prevent groups from merging after being dragged

* Fixed code style for [f777f028]
2024-09-05 17:29:33 +01:00
trianta
bd6d6e7f33
xwayland: add option to enable/disable xwayland (#7633)
* config: add xwayland enabled option to config

* xwayland: use DISPLAY env variable for enable/disable of new launches

* xwayland: close X11 windows when turning of XWayland

* clang: format fix

* config: add better description for xwayland:enabled

* xwayland: close X11 windows on disable without crashes

* xwayland: better method of informing CXWayland if xwayland enabled

* xwayland: prevent closing non-xwayland windows on disable

* misc: loop formatting
2024-09-05 17:26:46 +01:00
Vaxry
c5fd577181
config: Add a window rule to render while unfocused (#7582) 2024-08-30 17:37:52 +02:00
ParaN3xus
946ed1f32a
core: add option to control which window to focus on close (#7368) 2024-08-21 11:24:42 +01:00
Vaxry
92744b5b9a
IPC: Add config descriptions (#7377)
Thanks @gulafaran for the work

---

Co-authored-by: @gulafaran
2024-08-17 17:33:16 +01:00