nixos/home/swaync/default.nix
Evie Litherland-Smith ecc9fae75a Major changes: switch to tracking nixos-23.11 and remove stylix.
Motivated by the xz backdoor bug, switch NixOS system to track 23.11
instead of unstable, and will bump version numbers as they come along
rather than do rolling release.
Reverted a couple of changes that were introduced in recent nixpkgs
versions, only major one was switching back to swaylock as hyprlock
isn't in nixpkgs 23.11

Remove stylix and replace with lower-level base16.nix, partly because
stylix was doing something strange pulling in extra flakes (and
breaking on 23.11), partly because I was most of the way there anyway.
Remove last references to stylix in config, mostly just changing
stylix.colors to scheme (from base16) and defining fonts in
specialArgs to be used in the same way as before.
2024-03-31 12:59:24 +01:00

356 lines
8.2 KiB
Nix

{
pkgs,
fonts,
scheme,
accentColour ? "base07",
...
}: {
home.packages = [pkgs.swaynotificationcenter];
xdg.configFile."swaync/style.css".text = with scheme; ''
* {
all: unset;
font-size: ${toString fonts.sizes.desktop}px;
font-family: "${fonts.monospace.name}";
transition: 200ms;
}
.floating-notifications.background .notification-row .notification-background {
border-radius: 10px;
border: 1px solid ${withHashtag.${accentColour}};
margin: 18px;
background-color: rgba(${base00-rgb-r}, ${base00-rgb-g}, ${base00-rgb-b}, 0.8);
color: ${withHashtag.base05};
padding: 0;
}
.floating-notifications.background
.notification-row
.notification-background
.notification {
padding: 7px;
border-radius: 10px;
}
.floating-notifications.background
.notification-row
.notification-background
.notification
.notification-content {
margin: 7px;
}
.floating-notifications.background
.notification-row
.notification-background
.notification
.notification-content
.summary {
color: ${withHashtag.base05};
}
.floating-notifications.background
.notification-row
.notification-background
.notification
.notification-content
.time {
color: ${withHashtag.base04};
}
.floating-notifications.background
.notification-row
.notification-background
.notification
.notification-content
.body {
color: ${withHashtag.base05};
}
.floating-notifications.background
.notification-row
.notification-background
.notification
> *:last-child
> * {
min-height: 3.4em;
}
.floating-notifications.background
.notification-row
.notification-background
.notification
> *:last-child
> *
.notification-action {
border-radius: 10px;
background-color: ${withHashtag.base01};
color: ${withHashtag.base05};
margin: 7px;
}
.floating-notifications.background
.notification-row
.notification-background
.notification
> *:last-child
> *
.notification-action:hover {
background-color: ${withHashtag.base01};
color: ${withHashtag.base05};
}
.floating-notifications.background
.notification-row
.notification-background
.notification
> *:last-child
> *
.notification-action:active {
background-color: ${withHashtag.blue};
color: ${withHashtag.base00};
}
.floating-notifications.background
.notification-row
.notification-background
.close-button {
margin: 7px;
padding: 2px;
border-radius: 10px;
background-color: ${withHashtag.red};
color: ${withHashtag.base00};
}
.floating-notifications.background
.notification-row
.notification-background
.close-button:hover {
background-color: ${withHashtag.red};
color: ${withHashtag.base00};
}
.floating-notifications.background
.notification-row
.notification-background
.close-button:active {
background-color: ${withHashtag.red};
color: ${withHashtag.base00};
}
.control-center {
border-radius: 10px;
border: 1px solid ${withHashtag.${accentColour}};
margin: 18px;
background-color: rgba(${base00-rgb-r}, ${base00-rgb-g}, ${base00-rgb-b}, 0.8);
color: ${withHashtag.base05};
padding: 14px;
}
.control-center .widget-title {
color: ${withHashtag.base05};
font-size: 1.3em;
}
.control-center .widget-title button {
border-radius: 7px;
background-color: ${withHashtag.base01};
color: ${withHashtag.base05};
padding: 8px;
}
.control-center .widget-title button:hover {
background-color: ${withHashtag.base02};
color: ${withHashtag.base05};
}
.control-center .widget-title button:active {
background-color: ${withHashtag.base03};
color: ${withHashtag.base05};
}
.control-center .notification-row .notification-background {
border-radius: 10px;
background-color: ${withHashtag.base01};
color: ${withHashtag.base05};
margin-top: 14px;
}
.control-center .notification-row .notification-background .notification {
padding: 7px;
border-radius: 7px;
}
.control-center
.notification-row
.notification-background
.notification
.notification-content {
margin: 7px;
}
.control-center
.notification-row
.notification-background
.notification
.notification-content
.summary {
color: ${withHashtag.base05};
}
.control-center
.notification-row
.notification-background
.notification
.notification-content
.time {
color: ${withHashtag.base04};
}
.control-center
.notification-row
.notification-background
.notification
.notification-content
.body {
color: ${withHashtag.base05};
}
.control-center
.notification-row
.notification-background
.notification
> *:last-child
> * {
min-height: 3.4em;
}
.control-center
.notification-row
.notification-background
.notification
> *:last-child
> *
.notification-action {
border-radius: 7px;
background-color: ${withHashtag.base00};
color: ${withHashtag.base05};
margin: 7px;
}
.control-center
.notification-row
.notification-background
.notification
> *:last-child
> *
.notification-action:hover {
background-color: ${withHashtag.base01};;
color: ${withHashtag.base05};
}
.control-center
.notification-row
.notification-background
.notification
> *:last-child
> *
.notification-action:active {
background-color: ${withHashtag.blue};
color: ${withHashtag.base05};
}
.control-center .notification-row .notification-background .close-button {
margin: 7px;
padding: 2px;
border-radius: 6.3px;
background-color: ${withHashtag.red};
color: ${withHashtag.base00};
}
.control-center .notification-row .notification-background .close-button:hover {
background-color: ${withHashtag.red};
color: ${withHashtag.base00};
}
.control-center
.notification-row
.notification-background
.close-button:active {
background-color: ${withHashtag.red};
color: ${withHashtag.base00};
}
.control-center .notification-row .notification-background:hover {
background-color: ${withHashtag.base00};
color: ${withHashtag.base05};
}
.control-center .notification-row .notification-background:active {
background-color: ${withHashtag.blue};
color: ${withHashtag.base05};
}
progressbar,
progress,
trough {
border-radius: 12.6px;
}
.notification.critical progress {
background-color: ${withHashtag.red};
}
.notification.low progress,
.notification.normal progress {
background-color: ${withHashtag.blue};
}
trough {
background-color: ${withHashtag.base00};
}
.control-center trough {
background-color: ${withHashtag.base03};
}
.control-center-dnd {
margin-top: 5px;
border-radius: 8px;
background: ${withHashtag.base00};
border: 1px solid ${withHashtag.base03};
}
.control-center-dnd:checked {
background: ${withHashtag.base00};
}
.control-center-dnd slider {
background: ${withHashtag.base03};
border-radius: 8px;
}
.widget-dnd {
margin: 0px;
font-size: 1.1rem;
}
.widget-dnd > switch {
font-size: initial;
border-radius: 8px;
background: ${withHashtag.base00};
border: 1px solid ${withHashtag.base03};
}
.widget-dnd > switch:checked {
background: ${withHashtag.base00};
}
.widget-dnd > switch slider {
background: ${withHashtag.base01};
border-radius: 8px;
border: 1px solid ${withHashtag.${accentColour}};
}
'';
}