diff --git a/nodemon.json b/nodemon.json index 06889c7..a38bafe 100644 --- a/nodemon.json +++ b/nodemon.json @@ -1,5 +1,5 @@ { "watch": ["app.ts", "style.scss", "widget/"], - "ext": "ts, tsx, scss", + "ext": "ts, tsx, scss, css", "exec": "ags run --gtk4 ." } diff --git a/style.scss b/style.scss index 582bb08..ec93789 100644 --- a/style.scss +++ b/style.scss @@ -1,61 +1,97 @@ // https://gitlab.gnome.org/GNOME/gtk/-/blob/gtk-3-24/gtk/theme/Adwaita/_colors-public.scss -$fg-color: #{"@theme_fg_color"}; +// Colors: + +$fg-color: white; +$active-color: #bdae93; +$hover-color: #b8bb26; + $bg-color: #{"@theme_bg_color"}; $corner-size: 7; -$notch-color: #222; + +* { + font-size: 18px; +} window.Bar { background: transparent; + /* background: #fbf1c7; */ + padding: 2px; + margin: 5px; + border-radius: 40px; + padding-left: 10px; + + color: $fg-color; - /* font-weight: bold; */ - font-size: 25px; >centerbox { background: $bg-color; border-radius: 10px; } - button { - border-radius: 8px; - margin: 2px; - } .AudioSlider { min-width: 200px; } - .Workspaces { +} + +.Systray { + color: $fg-color; +} + +.Workspaces { + $workspace-button-size: 8px; + $bar-button-border-radius: 25px; + + margin: 0 60px 4px 60px; + margin: 0; + + border: 2px solid black; + padding: 3px; + border-radius: 40px; + transition: all 1 linear; + transition-delay: 1s; + + button { + all: unset; + color: $fg-color; + transition: min-width 0.25s ease-out; + margin: 1em; + padding: $workspace-button-size; + margin: $workspace-button-size; background-color: black; - margin: 0 60px 10px 60px; - border-radius: 0 0 20px 20px; - - button { - all: unset; - color: white; - - &.focused { - color: red; - border-color: blue; - } - - label { - transition: 200ms; - padding: 0 8px; - margin: 2px; - border-radius: 10px; - border: 1pt solid transparent; - } - - &:hover label { - background-color: blue; - border-color: $bg-color; - } - - &:active label { - background-color: green; - border-color: red; - } + border-radius: calc(nth($bar-button-border-radius, 1) * 1.5); + /* Hide non-occupied workspaces */ + min-height: 0; + min-width: 0; + margin: 0; + opacity: 0; + padding: 0; + transition: 0; + &:hover { + color: $fg-color; + background-color: $fg-color; } + + &.active, + &.occupied { + + opacity: 1; + margin: 1rem; + padding: $workspace-button-size; + margin: $workspace-button-size; + } + + &.active { + min-width: 2.5rem !important; + min-height: 0.95rem !important; + } + + &.occupied { + min-height: 0.65em; + min-width: 0.65rem; + } + } } \ No newline at end of file diff --git a/widget/systray.tsx b/widget/systray.tsx index 8245ef0..8c0b94b 100644 --- a/widget/systray.tsx +++ b/widget/systray.tsx @@ -4,7 +4,7 @@ import AstalTray from "gi://AstalTray?version=0.1" export default function Systray() { const tray = AstalTray.get_default() - return + return { bind(tray, "items").as(items => items.map(item => ( ("").poll(1000, () => GLib.DateTime.new_now_local().format("%H:%M")!) + return + } + +