river: Allow floating based on window titles
This extends the `float-filter-add` command to allow matching on window titles as well, using a `float-filter-add kind pattern` syntax. The following kinds are supported: * `title`, which matches window titles * `app-id`, which matches app ids Only exact matches are considered. As an example following configuration floats all windows with the title 'asdf with spaces'. riverctl float-filter-add title 'asdf with spaces'
This commit is contained in:
committed by
Isaac Freund
parent
e59c2a73d7
commit
546252aecf
@ -196,15 +196,10 @@ fn handleMap(listener: *wl.Listener(*wlr.XwaylandSurface), xwayland_surface: *wl
|
||||
view.current.float = true;
|
||||
view.pending.float = true;
|
||||
view.pending.box = view.float_box;
|
||||
} else {
|
||||
// Make views with app_ids listed in the float filter float
|
||||
if (self.xwayland_surface.class) |app_id| {
|
||||
if (server.config.float_filter.contains(std.mem.span(app_id))) {
|
||||
view.current.float = true;
|
||||
view.pending.float = true;
|
||||
view.pending.box = view.float_box;
|
||||
}
|
||||
}
|
||||
} else if (server.config.shouldFloat(view)) {
|
||||
view.current.float = true;
|
||||
view.pending.float = true;
|
||||
view.pending.box = view.float_box;
|
||||
}
|
||||
|
||||
view.map() catch {
|
||||
|
Reference in New Issue
Block a user