update styling

This commit is contained in:
Benjamin Palko 2025-04-06 10:06:12 -04:00
parent f8ac6c5177
commit cb5d4fd76d
8 changed files with 78 additions and 88 deletions

View file

@ -7,33 +7,48 @@ $surface1: #494d64;
$surface2: #5b6078; $surface2: #5b6078;
$rosewater: #f4dbd6; $rosewater: #f4dbd6;
$flamingo: #dd7878;
$pink: #ea76cb;
$mauve: #8839ef;
* { :root {
color: $rosewater;
font-family: JetBrainsMono Nerd Font; font-family: JetBrainsMono Nerd Font;
color: $mauve;
} }
button { button {
all: initial; all: initial;
font-family: inherit;
label:hover {
color: $base;
background: $rosewater;
}
} }
window.Bar { label {
background: transparent; all: initial;
font-weight: bold;
> centerbox { font-family: inherit;
background: rgba($color: $base, $alpha: 0.75); color: $mauve;
border-bottom: 1px solid $rosewater; padding: 4px 12px;
background: $surface0;
border-radius: 8px;
}
> box { .no-styles {
margin: 6px; all: initial;
& > * { }
margin: 0 4px;
}
}
}
.Arch { .active {
label {
background: $rosewater;
color: $base;
}
}
.Arch {
-gtk-icon-size: 24px; -gtk-icon-size: 24px;
padding: 4px 8px 4px 8px; padding: 4px 8px 4px 8px;
border-radius: 8px; border-radius: 8px;
@ -43,47 +58,20 @@ window.Bar {
background: $rosewater; background: $rosewater;
color: $base; color: $base;
} }
} }
.Pywal { .Pywal {
label {
font-size: 18px; font-size: 18px;
padding: 4px 18px 4px 12px; padding: 6px 16px 6px 10px;
border-radius: 8px;
background: $surface0;
&:hover {
background: $rosewater;
color: $base;
}
} }
}
.Tray > * { .Tray > * {
margin: 0 4px; margin: 0 4px;
} }
.Button { .WirePlumberMenu {
padding: 4px 12px;
border-radius: 8px;
background: $surface0;
&:hover {
background: $rosewater;
color: $base;
}
}
.Label {
padding: 4px 12px;
border-radius: 8px;
background: $surface0;
}
.Button-Active {
background: $rosewater;
color: $base;
}
.WirePlumberMenu {
contents { contents {
all: initial; all: initial;
} }
@ -96,9 +84,20 @@ window.Bar {
padding: 12px; padding: 12px;
border-radius: 8px; border-radius: 8px;
background: rgba($color: $base, $alpha: 0.9); background: rgba($color: $base, $alpha: 0.9);
}
}
window.Bar {
background: transparent;
> centerbox {
background: rgba($color: $base, $alpha: 0.75);
border-bottom: 1px solid $rosewater;
> box {
margin: 6px;
& > * { & > * {
margin: 2px 0; margin: 0 4px;
} }
} }
} }

View file

@ -8,7 +8,6 @@ function Calendar() {
return ( return (
<menubutton hexpand halign={Gtk.Align.END}> <menubutton hexpand halign={Gtk.Align.END}>
<label <label
cssClasses={["Button"]}
cursor={Gdk.Cursor.new_from_name("pointer", null)} cursor={Gdk.Cursor.new_from_name("pointer", null)}
label={time().as((t) => `${t}`)} label={time().as((t) => `${t}`)}
tooltip_text={date().as((d) => `󰸗 ${d}`)} tooltip_text={date().as((d) => `󰸗 ${d}`)}

View file

@ -6,6 +6,7 @@ const hyprland = Hyprland.get_default();
function Client() { function Client() {
return ( return (
<label <label
cssClasses={["no-styles"]}
label={bind(hyprland, "focused_client").as((fc) => fc.initialTitle)} label={bind(hyprland, "focused_client").as((fc) => fc.initialTitle)}
/> />
); );

View file

@ -23,7 +23,6 @@ function Internet() {
return ( return (
<box> <box>
<label <label
cssClasses={["Label"]}
label={bind(network, "wifi").as( label={bind(network, "wifi").as(
(w) => `${icon(w.strength)} ${w.strength}%`, (w) => `${icon(w.strength)} ${w.strength}%`,
)} )}

View file

@ -7,12 +7,7 @@ const Memory = function () {
(value) => Number(value), (value) => Number(value),
); );
return ( return <label label={bind(usage).as((usage) => `${usage.toFixed()}%`)} />;
<label
cssClasses={["Label"]}
label={bind(usage).as((usage) => `${usage.toFixed()} %`)}
/>
);
}; };
export default Memory; export default Memory;

View file

@ -37,7 +37,6 @@ const SwayNC = function () {
return ( return (
<button <button
cursor={Gdk.Cursor.new_from_name("pointer", null)} cursor={Gdk.Cursor.new_from_name("pointer", null)}
cssClasses={["Button"]}
onClicked={() => exec("swaync-client -t -sw")} onClicked={() => exec("swaync-client -t -sw")}
label={options().as((options) => Icon(options?.alt ?? "none"))} label={options().as((options) => Icon(options?.alt ?? "none"))}
></button> ></button>

View file

@ -12,7 +12,7 @@ const Tray = function () {
} }
return ( return (
<box cssClasses={["Tray", "Label"]}> <box cssClasses={["Tray"]}>
{bind(trayItems).as((items) => {bind(trayItems).as((items) =>
items.map((item) => { items.map((item) => {
return ( return (

View file

@ -30,7 +30,6 @@ const WirePlumber = function () {
label={bind(defaultSpeaker, "volume").as( label={bind(defaultSpeaker, "volume").as(
(volume) => `${Math.floor(volume * 100)}%`, (volume) => `${Math.floor(volume * 100)}%`,
)} )}
cssClasses={["Button"]}
hasTooltip={true} hasTooltip={true}
tooltipText={bind(defaultSpeaker, "description").as( tooltipText={bind(defaultSpeaker, "description").as(
(description) => description, (description) => description,
@ -41,8 +40,7 @@ const WirePlumber = function () {
{speakers.map((speaker) => ( {speakers.map((speaker) => (
<button <button
cssClasses={bind(speaker, "is_default").as((is_default) => [ cssClasses={bind(speaker, "is_default").as((is_default) => [
"Button", is_default ? "active" : "",
is_default ? "Button-Active" : "",
])} ])}
cursor={Gdk.Cursor.new_from_name("pointer", null)} cursor={Gdk.Cursor.new_from_name("pointer", null)}
onClicked={() => speaker.set_is_default(true)} onClicked={() => speaker.set_is_default(true)}