1
0
Fork 0
forked from wry/wry

all: remove traditional i3 titlebars, add corner rounding

This commit is contained in:
kossLAN 2026-04-09 23:04:33 -04:00
parent e1928863d9
commit a41dbae899
No known key found for this signature in database
52 changed files with 1866 additions and 1047 deletions

View file

@ -1411,24 +1411,20 @@ impl ConfigProxyHandler {
});
}
fn handle_set_show_titles(&self, show: bool) {
self.state.set_show_titles(show);
fn handle_set_show_titles(&self, _show: bool) {
// no-op: titles have been removed
}
fn handle_get_show_titles(&self) {
self.respond(Response::GetShowTitles {
show: self.state.theme.show_titles.get(),
});
self.respond(Response::GetShowTitles { show: false });
}
fn handle_set_floating_titles(&self, floating: bool) {
self.state.set_floating_titles(floating);
fn handle_set_floating_titles(&self, _floating: bool) {
// no-op: titles have been removed
}
fn handle_get_floating_titles(&self) {
self.respond(Response::GetFloatingTitles {
floating: self.state.theme.floating_titles.get(),
});
self.respond(Response::GetFloatingTitles { floating: false });
}
fn handle_set_bar_position(&self, position: BarPosition) -> Result<(), CphError> {
@ -1445,8 +1441,24 @@ impl ConfigProxyHandler {
});
}
fn handle_set_show_float_pin_icon(&self, show: bool) {
self.state.set_show_pin_icon(show);
fn handle_set_corner_radius(&self, radius: f32) {
use crate::theme::CornerRadius;
let radius = radius.max(0.0).min(1000.0);
self.state
.theme
.corner_radius
.set(CornerRadius::from(radius));
self.state.damage(self.state.root.extents.get());
}
fn handle_get_corner_radius(&self) {
self.respond(Response::GetCornerRadius {
radius: self.state.theme.corner_radius.get().top_left,
});
}
fn handle_set_show_float_pin_icon(&self, _show: bool) {
// no-op: titles have been removed, pin icon was in title bar
}
fn handle_set_workspace_display_order(&self, order: WorkspaceDisplayOrder) {
@ -2496,8 +2508,8 @@ impl ConfigProxyHandler {
self.state.set_bar_font(Some(font));
}
fn handle_set_title_font(&self, font: &str) {
self.state.set_title_font(Some(font));
fn handle_set_title_font(&self, _font: &str) {
// no-op: titles have been removed
}
fn handle_get_font(&self) {
@ -3310,6 +3322,10 @@ impl ConfigProxyHandler {
.handle_set_bar_position(position)
.wrn("set_bar_position")?,
ClientMessage::GetBarPosition => self.handle_get_bar_position(),
ClientMessage::SetCornerRadius { radius } => {
self.handle_set_corner_radius(radius)
}
ClientMessage::GetCornerRadius => self.handle_get_corner_radius(),
ClientMessage::SeatFocusHistory { seat, timeline } => self
.handle_seat_focus_history(seat, timeline)
.wrn("seat_focus_history")?,