Replaced mako with swaync

This commit is contained in:
Alejandro Angulo 2024-07-09 22:54:23 -07:00
parent 781964e875
commit dbd0630d45
Signed by: alejandro-angulo
GPG key ID: 75579581C74554B6
6 changed files with 142 additions and 138 deletions

View file

@ -1,35 +0,0 @@
{
options,
config,
lib,
pkgs,
...
}:
with lib; let
cfg = config.aa.desktop.addons.mako;
in {
options.aa.desktop.addons.mako = with types; {
enable = mkEnableOption "mako";
};
config = mkIf cfg.enable {
aa.system.fonts.enable = true;
environment.systemPackages = with pkgs; [mako libnotify];
aa.home.extraOptions = {
services.mako = {
enable = true;
font = "'Hack Nerd Font' Regular 9";
backgroundColor = "#1D2021F0";
textColor = "#FFFFDF";
borderColor = "#1C1C1C";
borderRadius = 10;
padding = "10";
};
};
};
}

View file

@ -0,0 +1,25 @@
{
config,
lib,
pkgs,
...
}: let
cfg = config.aa.desktop.addons.swaync;
in {
options.aa.desktop.addons.swaync = {
enable = lib.mkEnableOption "sway notification center";
};
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [libnotify];
aa.home.extraOptions = {
services.swaync = {
enable = true;
settings = {
widgets = ["title" "dnd" "notifications" "mpris"];
};
};
};
};
}

View file

@ -1,7 +1,6 @@
{
options,
config,
pkgs,
config,
lib,
...
}:
@ -45,6 +44,7 @@ in {
"memory"
"backlight"
"network"
"custom/notification"
"tray"
];
@ -141,6 +141,26 @@ in {
tooltip-format = "{essid} {signalStrength}%";
};
"custom/notification" = mkIf config.aa.desktop.addons.swaync.enable {
tooltip = false;
format = "{icon} {}";
format-icons = {
notification = "<span foreground='red'><sup></sup></span>";
none = "";
dnd-notification = "<span foreground='red'><sup></sup></span>";
dnd-none = "";
inhibited-notification = "<span foreground='red'><sup></sup></span>";
inhibited-none = "";
dnd-inhibited-notification = "<span foreground='red'><sup></sup></span>";
dnd-inhibited-none = "";
};
return-type = "json";
exec = "${pkgs.swaynotificationcenter}/bin/swaync-client -swb";
on-click = "${pkgs.swaynotificationcenter}/bin/swaync-client -t -sw";
on-click-right = "${pkgs.swaynotificationcenter}/bin/swaync-client -d -sw";
escape = true;
};
tray = {
spacing = 10;
};

View file

@ -1,19 +1,19 @@
* {
border: none;
font-family: Hack Nerd Font, sans-serif;
font-size: 1em;
border: none;
font-family: Hack Nerd Font, sans-serif;
font-size: 1em;
}
window#waybar {
background-color: rgba(29, 32, 33, 0.9);
border-bottom: 3px solid #1d2021;
color: #ffffdf;
transition-property: background-color;
transition-duration: .5s;
background-color: rgba(29, 32, 33, 0.9);
border-bottom: 3px solid #1d2021;
color: #ffffdf;
transition-property: background-color;
transition-duration: .5s;
}
window#waybar.hidden {
opacity: 0.2;
opacity: 0.2;
}
#workspaces,
@ -28,105 +28,111 @@ window#waybar.hidden {
#backlight,
#battery,
#network,
#tray {
background-color: #303030;
padding: 0 10px;
margin: 3px;
border: 3px solid rgba(0, 0, 0, 0);
border-radius: 90px;
background-clip: padding-box;
#tray,
#custom-notification {
background-color: #303030;
padding: 0 10px;
margin: 3px;
border: 3px solid rgba(0, 0, 0, 0);
border-radius: 90px;
background-clip: padding-box;
}
#workspaces button {
padding: 0 5px;
min-width: 20px;
color: #87afaf;
padding: 0 5px;
min-width: 20px;
color: #87afaf;
}
#workspaces button:hover {
background-color: rgba(0, 0, 0, 1)
background-color: rgba(0, 0, 0, 1)
}
#workspaces button.focused {
color: #ffaf00;
color: #ffaf00;
}
#workspaces button.urgent {
color: #e06c75;
color: #e06c75;
}
#clock {
color: #61afef;
color: #61afef;
}
#idle_inhibitor {
color: #abb2bf;
color: #abb2bf;
}
#idle_inhibitor.activated {
background-color: #abb2bf;
color: #1e222a;
background-color: #abb2bf;
color: #1e222a;
}
#temperature {
color: #fb4934;
color: #fb4934;
}
#temperature.critical {
color: #1d2021;
background-color: #9d0006;
color: #1d2021;
background-color: #9d0006;
}
#cpu {
color: #ff8700;
color: #ff8700;
}
#memory {
color: #87af87;
color: #87af87;
}
#battery {
color: #b8bb26;
color: #b8bb26;
}
#battery.charging, #battery.plugged {
background-color: #1f321c;
color: #ffffaf;
#battery.charging,
#battery.plugged {
background-color: #1f321c;
color: #ffffaf;
}
@keyframes blink {
to {
background-color: #1f321c;
color: #ffffaf;
}
to {
background-color: #1f321c;
color: #ffffaf;
}
}
#battery.critical:not(.charging) {
background-color: #afaf00;
color: #303030;
animation-name: blink;
animation-duration: 0.5s;
animation-timing-function: linear;
animation-iteration-count: infinite;
animation-direction: alternate;
background-color: #afaf00;
color: #303030;
animation-name: blink;
animation-duration: 0.5s;
animation-timing-function: linear;
animation-iteration-count: infinite;
animation-direction: alternate;
}
#pulseaudio {
color: #fabd2f;
color: #fabd2f;
}
#pulseaudio.muted {
color: #b57614;
color: #b57614;
}
#backlight {
color: #17ccd5;
color: #17ccd5;
}
#network {
color: #d787af;
color: #d787af;
}
#network.disconnected {
color: #875f87;
color: #875f87;
}
#custom\/notification {
color: red;
}

View file

@ -38,11 +38,11 @@ in {
aa.desktop.addons = {
alacritty.enable = true;
gammastep.enable = true;
mako.enable = true;
playerctl.enable = true;
rofi.enable = true;
swayidle.enable = true;
swaylock.enable = true;
swaync.enable = true;
waybar.enable = true;
# TODO