Currently, if a window class is specified in the swallow_regex (e.g.
Kitty) it will swallow every other window spawned by it automatically.
Many other WMs implementing this functionality allow for defining
exceptions from this rule. For instance, we want Kitty to swallow sxiv
or zathura but we do not want Kitty to swallow something like wev.
This commit adds an additional regex - swallow_exception_regex where
these exceptions can be defined. This regex is then compared against the
title of the window about to be swallowed and if it happens to be a
match, aborts the swallowing.
This works because whenever an application that could be swallowed is
launched by a terminal, the class of the terminal remains the same while
the title changes to whatever the application's name is, thus letting it
be matched against a regex.
* Allow switching to empty workspaces using movefocus
* Allow switching to other workspaces when no windows are focused
* Implement review feedback
* Add option to disable focus fallback
* Remove unnecessary braces
If debug:manual_crash is set on startup, parseKeyword tries
to call g_pHyprNotificationOverlay->addNotification, but
g_pHyprNotificationOverlay isn't initialized yet (is nullptr)
This commit adds a sanity check for that.
* Better and more secure argument parsing, and code reformatting
* Changes to resolve PR conversation
* Formatted via clang-format, fixed typos
* More typos
The previous code could run into issues into the following circumstances:
* The focused monitor is on its rightmost workspace with ID `i`.
* Another monitor has a workspace with ID `i+1`.
* `workspace_swipe_create_new` is enabled.
Then, swiping rightwards attempts to target a new workspace with ID
`i+1`: completing the swipe gesture unintentionally focuses that
workspace on whichever monitor it's already on while leaving the active
monitor in a broken state where it shows no windows but creates new
windows on the workspace it was previously on; and cancelling the swipe
gesture shifts the entire workspace `i+1` to the right by the width of
the active monitor.
By choosing an ID that doesn't exist, this problematic behavior is
avoided. More specifically, it's the smallest ID greater than any
existing workspace's ID, because otherwise the new workspace that was
seemingly just created to the right of the rightmost workspace could end
up somewhere in the middle of the workspace order.