diff options
| -rw-r--r-- | scss/sidebar.scss | 8 | ||||
| -rw-r--r-- | src/modules/sidebar/dashboard.tsx | 8 |
2 files changed, 9 insertions, 7 deletions
diff --git a/scss/sidebar.scss b/scss/sidebar.scss index 3f07678..1730f82 100644 --- a/scss/sidebar.scss +++ b/scss/sidebar.scss @@ -156,7 +156,6 @@ .details { font-size: lib.s(14); - color: scheme.$yellow; @include lib.spacing(8, true); @@ -166,8 +165,11 @@ margin-bottom: lib.s(10); } - .uptime { - color: scheme.$blue; + $-colours: scheme.$yellow, scheme.$blue; + @for $i from 1 through list.length($-colours) { + :nth-child(#{$i + 1}) { + color: list.nth($-colours, $i); + } } } } diff --git a/src/modules/sidebar/dashboard.tsx b/src/modules/sidebar/dashboard.tsx index e445029..df7be2b 100644 --- a/src/modules/sidebar/dashboard.tsx +++ b/src/modules/sidebar/dashboard.tsx @@ -1,5 +1,5 @@ import Players from "@/services/players"; -import { osIcon, osId } from "@/utils/system"; +import { bindCurrentTime, osIcon } from "@/utils/system"; import Slider from "@/widgets/slider"; import { bind, GLib, monitorFile, Variable } from "astal"; import { Gtk } from "astal/gtk3"; @@ -52,9 +52,9 @@ const User = () => { {bind(hasFace).as(h => (h ? <box visible={false} /> : <FaceFallback />))} </box> <box vertical hexpand valign={Gtk.Align.CENTER} className="details"> - <label xalign={0} className="name" label={`${osIcon} ${GLib.get_user_name()}`} /> - <label xalign={0} label={(GLib.getenv("XDG_CURRENT_DESKTOP") ?? osId).toUpperCase()} /> - <label truncate xalign={0} className="uptime" label={bind(uptime)} onDestroy={() => uptime.drop()} /> + <label truncate xalign={0} className="name" label={`${osIcon} ${GLib.get_user_name()}`} /> + <label truncate xalign={0} label={bind(uptime)} onDestroy={() => uptime.drop()} /> + <label truncate xalign={0} label={bindCurrentTime("%A, %e %B")} /> </box> </box> ); |