322 lines
8.3 KiB
CSS
322 lines
8.3 KiB
CSS
/* Widget/layout styling for taffybar.
|
|
*
|
|
* Colors live in `theme.css` (loaded via `palette.css`).
|
|
* IMPORTANT: use `@import url("...")` — bare `import` is silently ignored
|
|
* by GTK's CSS parser.
|
|
*/
|
|
@import url("theme.css");
|
|
@import url("end-widget-colors.css");
|
|
|
|
/* Base typography + foreground color for the bar itself.
|
|
*
|
|
* IMPORTANT: SNI menus are popup windows but inherit style context from the
|
|
* attach-widget chain. Avoid broad descendant selectors (especially `*`) here
|
|
* so we don't accidentally override menu theming.
|
|
*/
|
|
.taffy-box {
|
|
/* Most text should come from Iosevka Aile; icon glyphs (Font Awesome / Nerd
|
|
Font PUA) should come from a Nerd Font family to avoid tiny fallback glyphs. */
|
|
font-family: "Iosevka Aile", "Iosevka Nerd Font", "Iosevka NF", "Noto Sans", sans-serif;
|
|
font-size: 11pt;
|
|
font-weight: 600;
|
|
color: @font-color;
|
|
text-shadow: none;
|
|
}
|
|
|
|
/* Icon-label combined widgets (PulseAudio, NetworkManager): the `.icon` label
|
|
uses a nerd font character, so force the nerd font family on it. */
|
|
.icon-label > .icon {
|
|
font-family: "Iosevka Nerd Font";
|
|
padding-right: 11px;
|
|
}
|
|
|
|
/* Compact two-line RAM/SWAP widget: reduce icon padding a bit. */
|
|
.ram-swap .icon-label > .icon {
|
|
/* Different glyphs have different visual widths; fix the icon column width
|
|
so the value text aligns between the RAM and SWAP rows. */
|
|
min-width: 22px;
|
|
padding-right: 8px;
|
|
}
|
|
|
|
/* Stacked sun/lock pill: give each row a touch of horizontal breathing room. */
|
|
.sun-lock .wlsunset,
|
|
.sun-lock .screen-lock {
|
|
padding: 0px 4px;
|
|
}
|
|
|
|
/* The main bar container. border-radius matches the widget squircles (6px)
|
|
so the bar itself has softly rounded corners. */
|
|
.taffy-box {
|
|
border-width: 0px;
|
|
padding: 0px;
|
|
margin: 0px;
|
|
border-radius: 6px;
|
|
box-shadow: none;
|
|
background-color: @bar-background;
|
|
background-image: none;
|
|
}
|
|
|
|
/* With barLevels enabled we render one row per level; keep the tray-only row
|
|
visually light so the tray feels detached from the main widget strip. */
|
|
.level-2 {
|
|
background-color: transparent;
|
|
background-image: none;
|
|
box-shadow: none;
|
|
}
|
|
|
|
.level-2 .outer-pad.sni-tray {
|
|
margin-top: 0px;
|
|
}
|
|
|
|
/* Each widget is wrapped in outer-pad > inner-pad > contents by
|
|
buildContentsBox (Haskell). The outer-pad draws the squircle
|
|
background pill. border-radius kept low (6px) for a more squared
|
|
"squircle" shape rather than a fully rounded pill. */
|
|
.outer-pad {
|
|
background-color: @pill-background;
|
|
border: 0px;
|
|
border-radius: 6px;
|
|
margin: 4px 4px;
|
|
/* No white outline; define shape with subtle inner highlight + dark stroke. */
|
|
box-shadow:
|
|
inset 0 1px 0 @pill-highlight,
|
|
inset 0 0 0 1px @pill-border,
|
|
0 10px 24px @pill-shadow;
|
|
}
|
|
|
|
.inner-pad {
|
|
padding: 2px 10px;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.contents {
|
|
padding: 0px;
|
|
transition: background-color .2s;
|
|
opacity: 1;
|
|
}
|
|
|
|
/* Per-widget color overrides now live in end-widget-colors.css,
|
|
which rotates through a 5-color palette via :nth-child(). */
|
|
|
|
.outer-pad.mpris .icon {
|
|
font-family: "Iosevka Nerd Font";
|
|
}
|
|
|
|
/* MPRIS2 widget toggles `no-visible-children`/`visible-children` on the outer
|
|
widget. When nothing is visible, collapse the whole pill so it doesn't leave
|
|
an empty squircle gap in the end widget row. */
|
|
.outer-pad.mpris.no-visible-children {
|
|
margin: 0px;
|
|
background-color: @transparent;
|
|
box-shadow: none;
|
|
border-width: 0px;
|
|
}
|
|
|
|
.outer-pad.mpris.no-visible-children .inner-pad {
|
|
padding: 0px;
|
|
}
|
|
|
|
.outer-pad.mpris.no-visible-children .contents {
|
|
padding: 0px;
|
|
}
|
|
|
|
/* Workspaces styling */
|
|
|
|
/* Reset workspace .outer-pad pills to default styling so the nth-child color
|
|
rotation from end-widget-colors.css doesn't bleed into workspace pills.
|
|
This has specificity 0,2,0 (same as the nth-child rules) but comes later
|
|
in the cascade, so it wins. */
|
|
.workspaces .outer-pad {
|
|
background-color: @pill-background;
|
|
/* Keep workspace pills slightly tighter than default widget spacing. */
|
|
margin: 4px 3px;
|
|
box-shadow:
|
|
inset 0 1px 0 @pill-highlight,
|
|
inset 0 0 0 1px @pill-border,
|
|
0 10px 24px @pill-shadow;
|
|
}
|
|
.workspaces .outer-pad {
|
|
color: @font-color;
|
|
}
|
|
|
|
|
|
/* Asymmetric padding: 10px left leaves room for the overlaid workspace number
|
|
label; 3px right keeps the pill tight against the trailing icon edge. */
|
|
.workspaces .inner-pad {
|
|
box-shadow: none;
|
|
border-width: 0;
|
|
padding: 2px 3px 2px 10px;
|
|
}
|
|
|
|
.workspaces .contents {
|
|
box-shadow: none;
|
|
border-radius: 5px;
|
|
border-width: 0px;
|
|
border-style: solid;
|
|
border-color: @transparent;
|
|
padding: 0px 4px;
|
|
}
|
|
|
|
.workspace-label {
|
|
/* Overlay label (workspace number) that sits inside the icon "squircle". */
|
|
padding: 1px 3px;
|
|
margin: 0px;
|
|
font-size: 10pt;
|
|
opacity: 0.92;
|
|
font-weight: 700;
|
|
transition: color .2s;
|
|
background-color: @transparent;
|
|
}
|
|
|
|
/* The workspace label is overlaid bottom-left over the workspace icon strip.
|
|
Positioning: halign=start (left), valign=end (bottom) set in Haskell code.
|
|
Margins offset from that anchor point. */
|
|
.workspaces .overlay-box {
|
|
transition: background-color .2s, border-color .2s;
|
|
|
|
background-color: transparent;
|
|
border: none;
|
|
margin: 0px;
|
|
padding: 0px;
|
|
}
|
|
|
|
/* Position the workspace number inside the squircle pill. GTK overlays ignore
|
|
CSS margin for child positioning, so we use padding on the label itself:
|
|
padding-bottom pushes the text up from the bottom edge, padding-left pushes
|
|
it inward from the left corner to clear the border-radius. */
|
|
.workspaces .overlay-box .workspace-label {
|
|
background-color: transparent;
|
|
border: none;
|
|
padding: 2px 5px 5px 12px;
|
|
color: rgba(255, 255, 255, 0.92);
|
|
}
|
|
|
|
/* Accent-tinted background on the active workspace's squircle pill.
|
|
.active is set on the GtkOverlay (by setWorkspaceWidgetStatusClass in
|
|
Haskell), and .outer-pad is a child of that overlay, so
|
|
`.workspaces .active .outer-pad` correctly targets the pill. */
|
|
.workspaces .active .outer-pad {
|
|
background-color: rgba(241, 178, 178, 0.25);
|
|
box-shadow:
|
|
inset 0 0 0 1px rgba(241, 178, 178, 0.5),
|
|
inset 0 1px 0 @pill-highlight,
|
|
0 10px 24px @pill-shadow;
|
|
}
|
|
|
|
.workspaces .active .overlay-box {
|
|
background-color: transparent;
|
|
border-color: transparent;
|
|
}
|
|
|
|
.contents .window-icon {
|
|
border-width: 3px;
|
|
}
|
|
|
|
.active .contents .window-icon {
|
|
opacity: 1;
|
|
}
|
|
|
|
.active .contents {
|
|
background-color: rgba(255, 255, 255, 0.10);
|
|
opacity: 1;
|
|
}
|
|
|
|
/* (Handled above for workspaces.) */
|
|
|
|
.visible .contents {
|
|
background-color: rgba(255, 255, 255, 0.06);
|
|
}
|
|
|
|
.workspaces .window-icon-container {
|
|
/* Don't give each window icon its own background/border; the workspace
|
|
squircle is the background. */
|
|
background-color: transparent;
|
|
border: 0px;
|
|
box-shadow: none;
|
|
padding: 0px 2px;
|
|
}
|
|
|
|
.workspaces .window-icon-container.active {
|
|
background-color: rgba(255, 255, 255, 0.10);
|
|
border: 1px solid rgba(255, 255, 255, 0.5);
|
|
border-radius: 4px;
|
|
padding: 2px 4px;
|
|
}
|
|
|
|
.workspaces .active .contents,
|
|
.workspaces .visible .contents {
|
|
background-color: transparent;
|
|
}
|
|
|
|
.workspaces .window-icon {
|
|
border-width: 0px;
|
|
}
|
|
|
|
.window-icon-container {
|
|
transition: opacity .2s, box-shadow .2s;
|
|
opacity: 1;
|
|
border-radius: 5px;
|
|
transition: background-color .2s;
|
|
background-color: rgba(255, 255, 255, 0.04);
|
|
padding: 1px 4px;
|
|
border: 1px solid rgba(255, 255, 255, 0.08);
|
|
}
|
|
|
|
/* This gives space for the box-shadow (they look like underlines) that follow.
|
|
This will actually affect all widgets, (not just the workspace icons), but
|
|
that is what we want since we want the icons to look the same. */
|
|
.auto-size-image, .sni-tray {
|
|
padding: 1px 4px;
|
|
}
|
|
|
|
/* If the SNI tray is wrapped in our standard widget box, avoid double-padding. */
|
|
.sni-tray .sni-tray {
|
|
padding: 0px;
|
|
}
|
|
|
|
.window-icon-container.active {
|
|
background-color: rgba(255, 255, 255, 0.13);
|
|
border-color: rgba(255, 255, 255, 0.16);
|
|
}
|
|
|
|
.window-icon-container.urgent {
|
|
}
|
|
|
|
.window-icon-container.minimized .window-icon {
|
|
opacity: .3;
|
|
}
|
|
|
|
.window-icon {
|
|
opacity: 1;
|
|
transition: opacity .5s;
|
|
}
|
|
|
|
/* Button styling */
|
|
|
|
.taffy-window button {
|
|
all: initial;
|
|
background-color: @transparent;
|
|
border-width: 0px;
|
|
border-radius: 0px;
|
|
}
|
|
|
|
|
|
.taffy-window button:checked, .taffy-window button:hover .Contents:hover {
|
|
box-shadow: inset 0 -2px @accent;
|
|
background-color: rgba(255, 255, 255, 0.06);
|
|
}
|
|
|
|
.clock label,
|
|
.mpris label,
|
|
.battery label,
|
|
.ram-swap label {
|
|
letter-spacing: 0.2px;
|
|
}
|
|
|
|
|
|
/* ASUS platform profile widget */
|
|
.asus-profile { }
|
|
.asus-profile.quiet { color: @end-color-4-fg; }
|
|
.asus-profile.balanced { color: @end-color-1-fg; }
|
|
.asus-profile.performance { color: @end-color-5-fg; }
|