renderer: add support for floating-titlebars (#4)
Reviewed-on: https://git.kosslan.dev/wry/jay/pulls/4
This commit is contained in:
parent
4d803360dd
commit
6dba659978
13 changed files with 316 additions and 158 deletions
|
|
@ -153,6 +153,9 @@ impl ActionParser<'_> {
|
|||
"show-titles" => ShowTitles(true),
|
||||
"hide-titles" => ShowTitles(false),
|
||||
"toggle-titles" => ToggleTitles,
|
||||
"float-titles" => FloatTitles(true),
|
||||
"unfloat-titles" => FloatTitles(false),
|
||||
"toggle-float-titles" => ToggleFloatTitles,
|
||||
"focus-prev" => FocusHistory(Timeline::Older),
|
||||
"focus-next" => FocusHistory(Timeline::Newer),
|
||||
"focus-below" => FocusLayerRel(LayerDirection::Below),
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ use {
|
|||
config::{
|
||||
Theme,
|
||||
context::Context,
|
||||
extractor::{Extractor, ExtractorError, opt, recover, s32, str, val},
|
||||
extractor::{Extractor, ExtractorError, bol, opt, recover, s32, str, val},
|
||||
parser::{DataType, ParseResult, Parser, UnexpectedDataType},
|
||||
parsers::color::ColorParser,
|
||||
},
|
||||
|
|
@ -63,7 +63,7 @@ impl Parser for ThemeParser<'_> {
|
|||
font,
|
||||
title_font,
|
||||
),
|
||||
(bar_font, bar_position_val, bar_separator_width, gap),
|
||||
(bar_font, bar_position_val, bar_separator_width, gap, floating_titles),
|
||||
) = ext.extract((
|
||||
(
|
||||
opt(val("attention-requested-bg-color")),
|
||||
|
|
@ -94,8 +94,10 @@ impl Parser for ThemeParser<'_> {
|
|||
recover(opt(str("bar-position"))),
|
||||
recover(opt(s32("bar-separator-width"))),
|
||||
recover(opt(s32("gap"))),
|
||||
recover(opt(bol("floating-titles"))),
|
||||
),
|
||||
))?;
|
||||
let (title_gap,) = ext.extract((recover(opt(s32("title-gap"))),))?;
|
||||
macro_rules! color {
|
||||
($e:expr) => {
|
||||
match $e {
|
||||
|
|
@ -148,6 +150,8 @@ impl Parser for ThemeParser<'_> {
|
|||
bar_position,
|
||||
bar_separator_width: bar_separator_width.despan(),
|
||||
gap: gap.despan(),
|
||||
floating_titles: floating_titles.despan(),
|
||||
title_gap: title_gap.despan(),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue