config: allow capturing only selected workspaces
This commit is contained in:
parent
de71be0674
commit
9c7299234a
14 changed files with 224 additions and 4 deletions
|
|
@ -112,16 +112,27 @@ impl Renderer<'_> {
|
|||
x,
|
||||
y,
|
||||
);
|
||||
let has_captures =
|
||||
!output.screencasts.is_empty() || !output.global.pending_captures.is_empty();
|
||||
let rd = output.render_data.borrow_mut();
|
||||
if let Some(aw) = &rd.active_workspace {
|
||||
let c = theme.colors.focused_title_background.get();
|
||||
self.base.fill_boxes2(slice::from_ref(aw), &c, x, y);
|
||||
let c = match has_captures && aw.captured {
|
||||
true => theme.colors.captured_focused_title_background.get(),
|
||||
false => theme.colors.focused_title_background.get(),
|
||||
};
|
||||
self.base.fill_boxes2(slice::from_ref(&aw.rect), &c, x, y);
|
||||
}
|
||||
let c = theme.colors.separator.get();
|
||||
self.base
|
||||
.fill_boxes2(slice::from_ref(&rd.underline), &c, x, y);
|
||||
let c = theme.colors.unfocused_title_background.get();
|
||||
self.base.fill_boxes2(&rd.inactive_workspaces, &c, x, y);
|
||||
let c = match has_captures {
|
||||
true => theme.colors.captured_unfocused_title_background.get(),
|
||||
false => theme.colors.unfocused_title_background.get(),
|
||||
};
|
||||
self.base
|
||||
.fill_boxes2(&rd.captured_inactive_workspaces, &c, x, y);
|
||||
let scale = output.preferred_scale.get();
|
||||
for title in &rd.titles {
|
||||
let (x, y) = self.base.scale_point(x + title.tex_x, y + title.tex_y);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue