1
0
Fork 0
forked from wry/wry

tabs: hy3 tab styling, with corresponding config options.

tab-bar-height = 22
tab-bar-padding = 5
tab-bar-radius = 6
tab-bar-border-width = 2
tab-bar-text-padding = 3
tab-bar-gap = 6
tab-title-align = "center"
tab-active-bg-color = "#33ccff40"
tab-active-border-color = "#33ccffee"
tab-active-text-color = "#ffffffff"
tab-focused-bg-color = "#60606040"
tab-focused-border-color = "#808080ee"
tab-focused-text-color = "#ffffffff"
tab-inactive-bg-color = "#30303020"
tab-inactive-border-color = "#606060aa"
tab-inactive-text-color = "#ffffffff"
tab-urgent-bg-color = "#ff223340"
tab-urgent-border-color = "#ff2233ee"
tab-urgent-text-color = "#ffffffff"
This commit is contained in:
entailz 2026-05-29 03:16:22 -07:00
parent e35dce433a
commit e8f86dae8a
28 changed files with 920 additions and 242 deletions

View file

@ -2055,6 +2055,7 @@ impl ConfigClient {
radius
}
#[allow(dead_code)]
pub fn seat_toggle_expand(&self, seat: Seat) {
self.send(&ClientMessage::SeatToggleExpand { seat });
}
@ -2087,6 +2088,14 @@ impl ConfigClient {
self.send(&ClientMessage::SetTabTitleAlign { align });
}
pub fn set_tab_from_top(&self, from_top: bool) {
self.send(&ClientMessage::SetTabFromTop { from_top });
}
pub fn set_tab_render_text(&self, render: bool) {
self.send(&ClientMessage::SetTabRenderText { render });
}
pub fn seat_move_tab(&self, seat: Seat, right: bool) {
self.send(&ClientMessage::SeatMoveTab { seat, right });
}

View file

@ -911,6 +911,12 @@ pub enum ClientMessage<'a> {
SetTabTitleAlign {
align: u32,
},
SetTabFromTop {
from_top: bool,
},
SetTabRenderText {
render: bool,
},
SeatMoveTab {
seat: Seat,
right: bool,

View file

@ -464,6 +464,21 @@ pub fn set_tab_title_align(align: &str) {
get!().set_tab_title_align(val)
}
/// Sets whether tab enter/exit animations slide from the top.
///
/// When `true`, tabs slide in from above and out upwards.
/// When `false` (default), tabs slide in from below and out downwards.
pub fn set_tab_from_top(from_top: bool) {
get!().set_tab_from_top(from_top)
}
/// Sets whether text is rendered on tab buttons.
///
/// The default is `true`.
pub fn set_tab_render_text(render: bool) {
get!().set_tab_render_text(render)
}
/// Sets a callback to run when this config is unloaded.
///
/// Only one callback can be set at a time. If another callback is already set, it will be

View file

@ -334,6 +334,30 @@ pub mod colors {
///
/// Default: `#23092c`.
const 23 => TAB_ATTENTION_BACKGROUND_COLOR,
/// The background color of a focused (keyboard-focused) tab.
///
/// Default: `#3a5a70`.
const 24 => TAB_FOCUSED_BACKGROUND_COLOR,
/// The border color of a focused (keyboard-focused) tab.
///
/// Default: `#285577`.
const 25 => TAB_FOCUSED_BORDER_COLOR,
/// The text color of a focused (keyboard-focused) tab.
///
/// Default: `#dddddd`.
const 26 => TAB_FOCUSED_TEXT_COLOR,
/// The background color of an urgent tab.
///
/// Default: `#23092c`.
const 27 => TAB_URGENT_BACKGROUND_COLOR,
/// The border color of an urgent tab.
///
/// Default: `#441155`.
const 28 => TAB_URGENT_BORDER_COLOR,
/// The text color of an urgent tab.
///
/// Default: `#ffffff`.
const 29 => TAB_URGENT_TEXT_COLOR,
}
/// Sets the color of GUI element.
@ -430,5 +454,9 @@ pub mod sized {
///
/// Default: 4
const 12 => TAB_BAR_GAP,
/// The opacity of tabs in the tab bar (0-100).
///
/// Default: 100
const 13 => TAB_OPACITY,
}
}