ags: MASSIVE REVAMP

This commit is contained in:
biscuit
2025-06-11 20:57:02 -05:00
parent 38ba3a2fdb
commit b41a820dcc
3 changed files with 66 additions and 21 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 MiB

+33 -4
View File
@@ -1,8 +1,21 @@
@use "sass:color"; @use "sass:color";
$bg: #212223; // default
// $bg: #212223;
// $fg: #f1f1f1;
// $accent: #378DF7;
// $radius: 7px;
// Kanagawa Theme
// $bg: #1F1F28;
// $fg: #DCD7BA;
// $accent: #C0A36E;
// $radius: 7px;
// mstcl
$bg: #121212;
$fg: #f1f1f1; $fg: #f1f1f1;
$accent: #378DF7; $accent: #C0A36E;
$radius: 7px; $radius: 7px;
window.Bar { window.Bar {
@@ -12,7 +25,7 @@ window.Bar {
color: $fg; color: $fg;
font-size: 1.1em; font-size: 1.1em;
font-weight: bold; font-weight: bold;
font-family: "Rubik"; font-family: "JetBrainsMono Nerd Font";
label { label {
margin: 0 8px; margin: 0 8px;
@@ -55,8 +68,24 @@ window.Bar {
} }
} }
.Time {
.TimeHM {
font-weight: bold;
color: $accent;
}
.TimeDate {
// color: color.adjust($fg, $lightness: -10%);
color: $fg;
opacity: 0.85;
font-weight: normal;
}
}
.FocusedClient { .FocusedClient {
color: $accent; color: color.adjust($fg, $lightness: -30%);
opacity: 0.7;
} }
.Media .Cover { .Media .Cover {
+33 -17
View File
@@ -124,27 +124,42 @@ function Workspaces() {
} }
function FocusedClient() { function FocusedClient() {
const hypr = Hyprland.get_default() const hypr = Hyprland.get_default();
const focused = bind(hypr, "focusedClient") const focused = bind(hypr, "focusedClient");
return <box return (
className="Focused" <box className="FocusedClient" visible={focused.as(Boolean)}>
visible={focused.as(Boolean)}> {focused.as(client => {
{focused.as(client => ( if (!client) return null;
client && <label label={bind(client, "title").as(String)} />
))} return (
</box> <label
label={bind(client, "title").as(title => {
return title.length > 40
? title.slice(0, 37) + "..."
: title;
})}
/>
);
})}
</box>
);
} }
function Time({ format = "%H:%M|%a %b %d" }) {
function Time({ format = "%H:%M %a %b %d" }) {
const time = Variable<string>("").poll(1000, () => const time = Variable<string>("").poll(1000, () =>
GLib.DateTime.new_now_local().format(format)!) GLib.DateTime.new_now_local().format(format)!
);
return <label return bind(time).as(str => {
className="Time" const [hm, date] = str.split("|");
onDestroy={() => time.drop()}
label={time()} return (
/> <box className="Time">
<label className="TimeHM" label={hm} />
<label className="TimeDate" label={date} />
</box>
);
});
} }
export default function Bar(monitor: Gdk.Monitor) { export default function Bar(monitor: Gdk.Monitor) {
@@ -158,6 +173,7 @@ export default function Bar(monitor: Gdk.Monitor) {
<centerbox> <centerbox>
<box hexpand halign={Gtk.Align.START}> <box hexpand halign={Gtk.Align.START}>
<Workspaces /> <Workspaces />
<FocusedClient />
</box> </box>
<box> <box>
<Time /> <Time />