nixos/modules/home/ags/app/style.scss

614 lines
10 KiB
SCSS

@use "palette" as *;
// theme vars ported from AlfheimOS, mapped to the stylix palette
$radius: 12px; // keep in sync with RADIUS in Bar.tsx
$spacing: 8px;
$padding: 8px;
$border-width: 1px;
$border-color: $base02;
$border: $border-width solid $border-color;
$transition: 180ms;
$fg: $base05;
$primary-bg: $base0D;
$primary-fg: $base00;
$widget-bg: transparentize($base02, 0.45);
$hover-bg: transparentize($base02, 0.2);
$hover-overlay: transparentize($base05, 0.92);
$active-hover: transparentize($primary-bg, 0.15);
$active-gradient: linear-gradient(to right, $primary-bg, darken($primary-bg, 4%));
$toast-bg: transparentize($base02, 0.15);
$bar-alpha: 0.7;
$bar-bg: transparentize($base01, 1 - $bar-alpha);
$module-bg: transparentize($base02, 0.4);
* {
all: unset;
font-family: $font-family;
font-size: $font-size;
}
.Bar,
.popup-window {
background: transparent;
}
.bar {
background: $bar-bg;
padding: 0;
color: $base05;
label,
icon {
text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
-gtk-icon-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}
}
.bar-corners {
background: transparent;
color: $bar-bg;
}
.corner {
background: transparent;
color: $module-bg;
}
.bar .first,
.bar .center,
.bar .end,
.bar .last {
background: $module-bg;
padding: 2px 10px;
&:hover {
background: $base03;
}
}
.bar .first {
border-radius: 0 0 ($radius * 2.5) 0;
margin: 0 2px 0 0;
}
.bar .center {
border-radius: $radius;
margin: 2px;
}
.bar .end {
border-radius: ($radius * 0.75) ($radius * 2) ($radius * 0.75) ($radius * 2);
margin: 0 2px 2px;
}
.bar .last {
border-radius: 0 0 0 ($radius * 2.5);
margin: 0 0 0 2px;
}
.logo icon {
min-width: 20px;
min-height: 20px;
}
.clock {
font-weight: bold;
font-feature-settings: "tnum";
}
.clock icon {
font-size: 12px;
}
.ws {
min-width: 20px;
border-radius: 6px;
margin: 0 2px;
padding: 0 6px;
}
.ws.active {
background: $primary-bg;
color: $primary-fg;
}
.ws:hover {
background: transparentize($base05, 0.88);
}
.quicksettings icon {
font-size: 12px;
}
.quicksettings .notif-count,
.quicksettings .bt-count {
font-size: 0.8em;
}
.battery-level {
font-size: 0.85em;
}
// ---------- quicksettings popup ----------
.dropdown {
background: $base01;
border: $border-width solid transparentize($base02, 0.5);
border-radius: 10px;
padding: 10px 12px;
color: $fg;
}
scrollbar {
background: transparent;
border: none;
padding: 0 2px;
slider {
background: $base03;
border-radius: 999px;
min-width: 6px;
min-height: 6px;
margin: 2px;
}
}
.header {
margin-bottom: 6px;
color: transparentize($fg, 0.15);
.avatar {
padding: 7px;
border-radius: 10px;
background-color: $widget-bg;
border: $border;
}
.username {
font-weight: bold;
}
button {
padding: 7px 8px;
border-radius: 8px;
icon {
font-size: 16px;
}
&:hover {
background: $hover-bg;
}
}
}
.battery-section {
margin-bottom: 6px;
icon {
font-size: 16px;
}
}
.battery-percent {
font-weight: bold;
margin: 0 6px;
}
.battery-status {
font-size: 0.85em;
opacity: 0.7;
}
// volume, microphone and brightness rows on one widget card
.sliders-box {
background-color: $widget-bg;
border: $border;
border-radius: 10px;
padding: 6px;
.volume,
.microphone,
.brightness {
padding: 2px 4px;
}
button {
padding: 5px 7px;
border-radius: 6px;
icon {
font-size: 16px;
}
&:hover {
background: $hover-bg;
}
}
}
// shared slider look: bordered trough, accent gradient highlight,
// thumb only appears on hover, .muted turns the highlight gray
scale {
trough {
border-radius: 999px;
border: $border;
background-color: $base01;
min-height: 8px;
highlight {
border-radius: 999px;
background-image: $active-gradient;
min-height: 8px;
}
slider {
background-color: transparent;
border: $border-width solid transparent;
border-radius: 999px;
min-width: 10px;
min-height: 10px;
}
}
&:hover {
trough {
background-color: transparentize($base01, 0.4);
}
trough slider {
background-color: $base04;
border-color: $border-color;
}
}
&.muted trough highlight {
background-image: none;
background-color: transparentize($fg, 0.2);
}
}
// icon + label pill with a detached arrow
.toggle-button {
margin: 4px 0;
background-color: $widget-bg;
border: $border;
border-radius: 10px;
font-weight: bold;
button:first-child {
padding: 8px 10px;
border-radius: 10px;
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
button:last-child {
padding: 4px 8px;
border-radius: 10px;
border-top-left-radius: 0;
border-bottom-left-radius: 0;
icon {
font-size: 12px;
}
}
.icon {
font-size: 16px;
margin-right: 8px;
}
button:hover {
background: $hover-overlay;
}
&.active {
background-color: $primary-bg;
label,
icon {
color: $primary-fg;
}
button:hover {
background: $active-hover;
}
}
}
// arrow-less toggle pill (do not disturb)
.simple-toggle {
margin: 4px 0;
padding: 9px 10px;
border-radius: 10px;
background-color: $widget-bg;
border: $border;
font-weight: bold;
.icon {
font-size: 16px;
margin-right: 8px;
}
&:hover {
background: $hover-bg;
}
&.active {
background-color: $primary-bg;
label,
icon {
color: $primary-fg;
}
&:hover {
background: $active-hover;
}
}
}
.menu {
background-color: $widget-bg;
border: $border;
border-radius: 10px;
padding: 8px;
margin: 4px 0 8px;
.title-box {
margin: 2px 0 4px;
.icon {
font-size: 14px;
margin: 0 4px 0 2px;
}
.title {
font-weight: bold;
opacity: 0.85;
}
}
.menu-separator {
background: $border-color;
min-height: 1px;
margin: 4px 0;
}
button {
padding: 5px 7px;
border-radius: 6px;
icon {
font-size: 16px;
}
&:hover {
background: $hover-overlay;
}
}
}
.wifi-status,
.wifi-empty {
font-size: 0.85em;
opacity: 0.7;
margin: 2px 0;
}
.wifi-password {
margin: 4px 0;
padding: 5px 8px;
border-radius: 6px;
background: $base01;
color: $fg;
}
.wifi-row {
margin: 1px 0;
icon {
font-size: 16px;
}
.wifi-row-ssid {
margin: 0 6px;
}
}
.device-row {
margin: 1px 0;
.device-name {
margin: 0 6px;
}
.device-battery {
font-size: 0.85em;
opacity: 0.7;
margin-right: 6px;
}
.device-connecting {
font-size: 14px;
opacity: 0.7;
margin-right: 2px;
}
}
// media player card
.player {
background-color: $widget-bg;
border: $border;
border-radius: 10px;
padding: 8px;
margin: 4px 0;
.cover {
padding: 12px;
border-radius: 10px;
background-color: $hover-bg;
background-size: cover;
background-position: center;
}
.player-title {
font-weight: bold;
}
.player-artist {
font-size: 0.9em;
color: transparentize($fg, 0.2);
}
scale {
margin: 4px 0;
trough {
border: none;
}
trough highlight {
background-image: linear-gradient($fg, $fg);
}
}
.player-ctl {
padding: 4px 6px;
border-radius: 999px;
icon {
font-size: 14px;
}
&:hover {
background: $hover-overlay;
}
}
.play-pause {
background-color: $primary-bg;
icon {
color: $primary-fg;
}
&:hover {
background: $active-hover;
}
}
.player-position,
.player-length {
font-size: 0.85em;
opacity: 0.7;
}
}
.notif-section {
margin-top: 10px;
border-top: 1px solid $border-color;
padding-top: 8px;
}
.notif-header {
label {
font-weight: bold;
margin: 0 2px;
}
}
.notif-clear {
padding: 4px 10px;
border-radius: 6px;
font-size: 0.85em;
&:hover {
background: $hover-bg;
}
}
.notif-empty {
font-size: 0.85em;
opacity: 0.7;
}
.notifications {
.notif {
background-color: $widget-bg;
border: $border;
border-radius: 10px;
padding: 8px 10px;
&:hover {
background: $hover-bg;
}
&.critical {
border-color: $base08;
}
// popup toasts are more opaque than list entries and become
// completely opaque while hovered
&.toast {
background-color: $toast-bg;
&:hover {
background-color: $base02;
}
}
}
.notif-header {
margin-bottom: 4px;
.notif-app-name {
font-weight: bold;
margin: 0 6px;
}
.notif-time {
font-size: 0.85em;
opacity: 0.7;
margin-right: 4px;
}
.notif-close {
border-radius: 6px;
padding: 0 2px;
&:hover {
background: $hover-overlay;
}
}
}
.notif-content {
.notif-image {
margin-right: 8px;
}
.notif-summary {
font-weight: bold;
}
.notif-text {
font-size: 0.9em;
opacity: 0.85;
}
}
.notif-action {
background: $base01;
border-radius: 6px;
margin-top: 6px;
padding: 2px 8px;
&:hover {
background: $hover-bg;
}
}
}