all: remove traditional i3 titlebars, add corner rounding
This commit is contained in:
parent
e1928863d9
commit
a41dbae899
52 changed files with 1866 additions and 1047 deletions
|
|
@ -228,6 +228,7 @@ pub struct Theme {
|
|||
pub gap: Option<i32>,
|
||||
pub floating_titles: Option<bool>,
|
||||
pub title_gap: Option<i32>,
|
||||
pub corner_radius: Option<f32>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ use {
|
|||
config::{
|
||||
Theme,
|
||||
context::Context,
|
||||
extractor::{Extractor, ExtractorError, bol, opt, recover, s32, str, val},
|
||||
extractor::{Extractor, ExtractorError, bol, fltorint, opt, recover, s32, str, val},
|
||||
parser::{DataType, ParseResult, Parser, UnexpectedDataType},
|
||||
parsers::color::ColorParser,
|
||||
},
|
||||
|
|
@ -97,7 +97,10 @@ impl Parser for ThemeParser<'_> {
|
|||
recover(opt(bol("floating-titles"))),
|
||||
),
|
||||
))?;
|
||||
let (title_gap,) = ext.extract((recover(opt(s32("title-gap"))),))?;
|
||||
let (title_gap, corner_radius) = ext.extract((
|
||||
recover(opt(s32("title-gap"))),
|
||||
recover(opt(fltorint("corner-radius"))),
|
||||
))?;
|
||||
macro_rules! color {
|
||||
($e:expr) => {
|
||||
match $e {
|
||||
|
|
@ -152,6 +155,7 @@ impl Parser for ThemeParser<'_> {
|
|||
gap: gap.despan(),
|
||||
floating_titles: floating_titles.despan(),
|
||||
title_gap: title_gap.despan(),
|
||||
corner_radius: corner_radius.map(|v| v.value as f32),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ use {
|
|||
set_color_management_enabled, set_default_workspace_capture, set_explicit_sync_enabled,
|
||||
set_float_above_fullscreen, set_idle, set_idle_grace_period,
|
||||
set_floating_titles, set_middle_click_paste_enabled, set_show_bar, set_show_float_pin_icon,
|
||||
set_show_titles,
|
||||
set_show_titles, set_corner_radius,
|
||||
set_ui_drag_enabled, set_ui_drag_threshold,
|
||||
status::{set_i3bar_separator, set_status, set_status_command, unset_status_command},
|
||||
switch_to_vt,
|
||||
|
|
@ -1020,6 +1020,9 @@ impl State {
|
|||
font!(set_font, font);
|
||||
font!(set_title_font, title_font);
|
||||
font!(set_bar_font, bar_font);
|
||||
if let Some(radius) = theme.corner_radius {
|
||||
set_corner_radius(radius);
|
||||
}
|
||||
}
|
||||
|
||||
fn handle_switch_device(self: &Rc<Self>, dev: InputDevice, actions: &Rc<SwitchActions>) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue