update system

This commit is contained in:
2025-05-04 12:57:55 +02:00
parent df0600601b
commit 34a7ef00fd
18 changed files with 717 additions and 81 deletions

View File

@@ -11,6 +11,15 @@ in
{
options.theme.md3-evo = {
enable = lib.mkEnableOption "the MD3-EVO theme";
auto-dark = {
enable = lib.mkEnableOption "Automatically switch between light and dark mode";
lon = lib.mkOption {
type = lib.types.float;
};
lat = lib.mkOption {
type = lib.types.float;
};
};
flavour = lib.mkOption {
type = lib.types.enum [
"content"
@@ -177,9 +186,11 @@ in
pkgs.matugen
pkgs.swww
pkgs.zenity
pkgs.sunwait
];
text = ''
WALLPAPER=${config.xdg.configHome}/matugen/wallpaper
STATE=${config.xdg.stateHome}/md3-evo
SCHEME=$(dconf read /org/gnome/desktop/interface/color-scheme)
if [ "$SCHEME" = "'prefer-light'" ]; then
@@ -188,8 +199,15 @@ in
MODE="dark"
fi
if [ ! -d "$STATE" ]; then
mkdir -p "$STATE"
fi
if [ -f "$STATE/mode" ]; then
MODE=$(cat "$STATE/mode")
fi
if [ $# -eq 0 ]; then
echo -e "\033[1mUsage:\033[0m mode|light|dark|toggle|wallpaper"
echo -e "\033[1mUsage:\033[0m mode|light|dark|auto|toggle|wallpaper"
exit 1
elif [ "$1" = "mode" ]; then
echo -e "$MODE"
@@ -207,8 +225,10 @@ in
else
MODE="light"
fi
elif [ "$1" = "light" ] || [ "$1" = "dark" ]; then
echo "$MODE" > "$STATE/mode"
elif [ "$1" = "light" ] || [ "$1" = "dark" ] || [ "$1" == "auto" ]; then
MODE="$1"
echo "$MODE" > "$STATE/mode"
elif [ "$1" = "init" ]; then
echo -e "\033[1mSetting up matugen\033[0m"
else
@@ -221,6 +241,35 @@ in
exit 1
fi
THEME_SERVICE_PATH="${config.xdg.configHome}/systemd/user/theme-init.timer"
if [ "$MODE" = "auto" ]; then
TIME=$(sunwait poll ${builtins.toString cfg.auto-dark.lat}N ${builtins.toString cfg.auto-dark.lon}E || :)
if [ "$TIME" = "DAY" ]; then
MODE="light"
NEXT=6
else
MODE="dark"
NEXT=4
fi
NEXT=$(sunwait report ${builtins.toString cfg.auto-dark.lat}N ${builtins.toString cfg.auto-dark.lon}E | awk "/Daylight:/ {print \$$NEXT}")
cat <<EOF | tee "$THEME_SERVICE_PATH" > /dev/null
[Unit]
Description=Next theme change timer
[Timer]
OnCalendar=*-*-* $(date -d "$NEXT today + 5 minutes" +'%H:%M'):00
AccuracySec=1min
[Install]
WantedBy=timers.target
EOF
else
rm -f "$THEME_SERVICE_PATH"
fi
systemctl --user daemon-reload &> /dev/null || :
systemctl --user restart theme-init.timer &> /dev/null || :
if [ "$MODE" = "light" ]; then
GTK_THEME="adw-gtk3"
else
@@ -237,6 +286,10 @@ in
hyprctl reload
fi
if which swaync-client; then
swaync-client --reload-css
fi
for i in $(pgrep -u "$USER" -x nvim); do
kill -USR1 "$i"
done
@@ -247,6 +300,7 @@ in
lib.mkIf cfg.enable {
home.packages = [
pkgs.adw-gtk3
pkgs.swww
theme-script
];
@@ -263,19 +317,17 @@ in
qt.platformTheme.name = "qtct";
systemd.user.services = {
/*
swww-daemon = {
Unit = {
Description = "Swww Daemon";
After = [ "graphical-session.target" ];
};
Install.WantedBy = [ "graphical-session.target" ];
Service = {
ExecStart = "${pkgs.swww}/bin/swww-daemon";
Restart = "on-failure";
};
swww-daemon = {
Unit = {
Description = "Swww Daemon";
After = [ "graphical-session.target" ];
};
*/
Install.WantedBy = [ "graphical-session.target" ];
Service = {
ExecStart = "${pkgs.swww}/bin/swww-daemon";
Restart = "always";
};
};
theme-init = {
Unit = {
Description = "MD3 Evo Theme Init";
@@ -346,7 +398,7 @@ in
reload_apps = true;
reload_apps_list = {
kitty = config.programs.kitty.enable;
waybar = false;
waybar = config.programs.waybar.enable;
dunst = config.services.dunst.enable;
};
@@ -433,6 +485,14 @@ in
input_path = ./discord.css;
output_path = "${config.xdg.configHome}/vesktop/themes/matugen.theme.css";
};
waybar = {
input_path = ./waybar.css;
output_path = "${config.xdg.configHome}/waybar/style.css";
};
swaync = {
input_path = ./swaync.css;
output_path = "${config.xdg.configHome}/swaync/style.css";
};
};
};
};

View File

@@ -4,7 +4,7 @@ if exists("syntax_on")
endif
let g:colors_name="md3-evo"
let g:neovide_transparency = 1.0
let g:neovide_opacity = 1.0
let g:neovide_floating_corner_radius = 0.5
let g:neovide_normal_opacity = {{custom.transparency}}
let g:neovide_padding_top = {{custom.padding}}

View File

@@ -0,0 +1,375 @@
syntax error
* {
font-size: 14px;
font-family: "Noto Sans";
transition: 100ms;
box-shadow: unset;
}
.control-center .notification-row {
background-color: unset;
}
.control-center .notification-row .notification-background .notification,
.control-center
.notification-row
.notification-background
.notification
.notification-content,
.floating-notifications
.notification-row
.notification-background
.notification,
.floating-notifications.background
.notification-background
.notification
.notification-content {
margin-bottom: unset;
}
.control-center .notification-row .notification-background .notification {
margin-top: 0.15rem;
}
.control-center .notification-row .notification-background .notification box,
.control-center .notification-row .notification-background .notification widget,
.control-center
.notification-row
.notification-background
.notification
.notification-content,
.floating-notifications
.notification-row
.notification-background
.notification
box,
.floating-notifications
.notification-row
.notification-background
.notification
widget,
.floating-notifications.background
.notification-background
.notification
.notification-content {
border: unset;
border-radius: 1.159rem;
-gtk-outline-radius: 1.159rem;
}
.floating-notifications.background
.notification-background
.notification
.notification-content,
.control-center .notification-background .notification .notification-content {
background-color: {{colors.background.default.hex}};
padding: 0.818rem;
padding-right: unset;
margin-right: unset;
}
.control-center
.notification-row
.notification-background
.notification.low
.notification-content
label,
.control-center
.notification-row
.notification-background
.notification.normal
.notification-content
label,
.floating-notifications.background
.notification-background
.notification.low
.notification-content
label,
.floating-notifications.background
.notification-background
.notification.normal
.notification-content
label {
color: {{colors.outline.default.hex}};
}
.control-center
.notification-row
.notification-background
.notification..notification-content
image,
.control-center
.notification-row
.notification-background
.notification.normal
.notification-content
image,
.floating-notifications.background
.notification-background
.notification.low
.notification-content
image,
.floating-notifications.background
.notification-background
.notification.normal
.notification-content
image {
background-color: {{colors.surface_container_high.default.hex}};
color: {{colors.on_surface.default.hex}};
}
.control-center
.notification-row
.notification-background
.notification.critical
.notification-content,
.floating-notifications.background
.notification-background
.notification.critical
.notification-content {
background-color: {{colors.surface_container_high.default.hex}};
color: {{colors.on_surface.default.hex}};
}
.control-center
.notification-row
.notification-background
.notification
.notification-content
.summary,
.floating-notifications.background
.notification-background
.notification
.notification-content
.summary {
font-family: "Noto Sans", sans-serif;
font-size: 0.9909rem;
font-weight: 500;
}
.control-center
.notification-row
.notification-background
.notification
.notification-content
.time,
.floating-notifications.background
.notification-background
.notification
.notification-content
.time {
font-family: "Noto Sans", sans-serif;
font-size: 0.8291rem;
font-weight: 500;
margin-right: 1rem;
padding-right: unset;
}
.control-center
.notification-row
.notification-background
.notification
.notification-content
.body,
.floating-notifications.background
.notification-background
.notification
.notification-content
.body {
font-family: "Noto Sans", sans-serif;
font-size: 0.8891rem;
font-weight: 400;
margin-top: 0.31rem;
padding-right: unset;
margin-right: unset;
}
.control-center .notification-row .close-button,
.floating-notifications.background .close-button {
background-color: unset;
border-radius: 100%;
border: none;
box-shadow: none;
margin-right: 13px;
margin-top: 6px;
margin-bottom: unset;
padding-bottom: unset;
min-height: 20px;
min-width: 20px;
text-shadow: none;
}
.control-center .notification-row .close-button:hover,
.floating-notifications.background .close-button:hover {
background-color: rgba({{colors.background.default.red}}, {{colors.background.default.green}}, {{colors.background.default.blue}}, 0.15);
}
.control-center {
border-radius: 1.705rem;
-gtk-outline-radius: 1.705rem;
border-top: 1px solid rgba(164, 162, 167, 0.19);
border-left: 1px solid rgba(164, 162, 167, 0.19);
border-right: 1px solid rgba(128, 127, 132, 0.145);
border-bottom: 1px solid rgba(128, 127, 132, 0.145);
box-shadow: 0px 2px 3px rgba(0, 0, 0, 0.45);
margin: 7px;
background-color: {{colors.background.default.hex}};
padding: 1.023rem;
}
.control-center trough {
border-radius: 9999px;
-gtk-outline-radius: 9999px;
min-width: 0.545rem;
background-color: transparent;
}
.control-center slider {
border-radius: 9999px;
-gtk-outline-radius: 9999px;
min-width: 0.273rem;
min-height: 2.045rem;
background-color: rgba(199, 197, 208, 0.31);
}
.control-center slider:hover {
background-color: rgba(199, 197, 208, 0.448);
}
.control-center slider:active {
background-color: #77767e;
}
/* title widget */
.widget-title {
padding: 0.341rem;
margin: unset;
}
.widget-title label {
font-family: "Noto Sans", sans-serif;
font-size: 1.364rem;
color: {{colors.on_background.default.hex}};
margin-left: 0.941rem;
}
.widget-title button {
border: unset;
background-color: unset;
border-radius: 1.159rem;
-gtk-outline-radius: 1.159rem;
padding: 0.141rem 0.141rem;
margin-right: 0.841rem;
}
.widget-title button label {
font-family: "Noto Sans", sans-serif;
font-size: 1.0409rem;
color: {{colors.on_background.default.hex}};
margin-right: 0.841rem;
}
.widget-title button:hover {
background-color: rgba(128, 128, 128, 0.3);
}
.widget-title button:active {
background-color: rgba(128, 128, 128, 0.7);
}
/* Buttons widget */
.widget-buttons-grid {
border-radius: 1.159rem;
-gtk-outline-radius: 1.159rem;
padding: 0.341rem;
background-color: rgba(28, 28, 34, 0.35);
padding: unset;
}
.widget-buttons-grid > flowbox {
padding: unset;
}
.widget-buttons-grid > flowbox > flowboxchild > button:first-child {
margin-left: unset;
}
.widget-buttons-grid > flowbox > flowboxchild > button {
border: none;
background-color: unset;
border-radius: 9999px;
min-width: 5.522rem;
min-height: 2.927rem;
padding: unset;
margin: unset;
}
.widget-buttons-grid > flowbox > flowboxchild > button label {
font-family: "Materials Symbol Rounded";
font-size: 1.3027rem;
color: #e4e1e6;
}
.widget-buttons-grid > flowbox > flowboxchild > button:hover {
background-color: rgba(128, 128, 128, 0.3);
}
.widget-buttons-grid > flowbox > flowboxchild > button:checked {
/* OnePlus McClaren edition Orange accent */
background-color: #ff9f34;
}
.widget-buttons-grid > flowbox > flowboxchild > button:checked label {
color: #14141b;
}
/* Volume widget */
.widget-volume {
background-color: rgba(28, 28, 34, 0.35);
padding: 8px;
margin: 8px;
-gtk-outline-radius: 1.159rem;
-gtk-outline-radius: 1.159rem;
}
.widget-volume trough {
/* OnePlus McClaren edition Orange accent */
border: unset;
background-color: rgba(128, 128, 128, 0.4);
}
.widget-volume trough slider {
/* OnePlus McClaren edition Orange accent */
color: unset;
background-color: #ff9f34;
border-radius: 100%;
min-height: 1.25rem;
}
/* Mpris widget */
.widget-mpris {
background-color: rgba(28, 28, 34, 0.35);
padding: 8px;
margin: 8px;
border-radius: 1.159rem;
-gtk-outline-radius: 1.159rem;
}
.widget-mpris-player {
padding: 8px;
margin: 8px;
}
.widget-mpris-title {
font-weight: bold;
font-size: 1.25rem;
}
.widget-mpris-subtitle {
font-size: 1.1rem;
}

View File

@@ -0,0 +1,70 @@
window#waybar {
background: none;
border-bottom: none;
}
window#waybar > box.horizontal {
margin: 12px 24px 0;
}
.module {
color: white;
background: none;
margin: 0 8px;
}
#clock {
font-weight: bold;
font-size: 16px;
}
#privacy-item {
padding: 0 16px;
border-radius: 16px;
}
#pulseaudio-slider {
margin: 0 6px;
padding: 0;
}
#pulseaudio-slider slider {
background: none;
min-height: 12px;
min-width: 12px;
border-radius: 100%;
margin: 0;
opacity: 0;
background-image: none;
border: none;
box-shadow: none;
}
#pulseaudio-slider trough {
min-height: 12px;
min-width: 80px;
border-radius: 6px;
background-color: {{colors.on_primary.default.hex}};
}
#pulseaudio-slider highlight {
min-width: 12px;
border-radius: 6px;
background-color: {{colors.primary.default.hex}};
}
#privacy-item.audio-in {
background: {{colors.primary.default.hex}};
color: {{colors.on_primary.default.hex}};
}
#privacy-item.audio-out {
background: {{colors.secondary.default.hex}};
color: {{colors.on_secondary.default.hex}};
}
#privacy-item.screenshare {
background: {{colors.tertiary.default.hex}};
color: {{colors.on_tertiary.default.hex}};
}