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

@ -101,22 +101,6 @@
} }
}, },
"flake-compat_3": { "flake-compat_3": {
"flake": false,
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_4": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1650374568, "lastModified": 1650374568,
@ -137,11 +121,11 @@
"nixpkgs-lib": "nixpkgs-lib" "nixpkgs-lib": "nixpkgs-lib"
}, },
"locked": { "locked": {
"lastModified": 1717285511, "lastModified": 1719994518,
"narHash": "sha256-iKzJcpdXih14qYVcZ9QC9XuZYnPc6T8YImb6dX166kw=", "narHash": "sha256-pQMhCCHyQGRzdfAkdJ4cIWiw+JNuWsTX7f0ZYSyz0VY=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "flake-parts", "repo": "flake-parts",
"rev": "2a55567fcf15b1b1c7ed712a2c6fadaec7412ea8", "rev": "9227223f6d922fee3c7b190b2cc238a99527bbb7",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -159,11 +143,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1717285511, "lastModified": 1719877454,
"narHash": "sha256-iKzJcpdXih14qYVcZ9QC9XuZYnPc6T8YImb6dX166kw=", "narHash": "sha256-g5N1yyOSsPNiOlFfkuI/wcUjmtah+nxdImJqrSATjOU=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "flake-parts", "repo": "flake-parts",
"rev": "2a55567fcf15b1b1c7ed712a2c6fadaec7412ea8", "rev": "4e3583423212f9303aa1a6337f8dffb415920e4f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -228,7 +212,11 @@
}, },
"git-hooks": { "git-hooks": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_3", "flake-compat": [
"nixvim",
"nixvim",
"flake-compat"
],
"gitignore": "gitignore", "gitignore": "gitignore",
"nixpkgs": [ "nixpkgs": [
"nixvim", "nixvim",
@ -242,11 +230,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1717664902, "lastModified": 1719259945,
"narHash": "sha256-7XfBuLULizXjXfBYy/VV+SpYMHreNRHk9nKMsm1bgb4=", "narHash": "sha256-F1h+XIsGKT9TkGO3omxDLEb/9jOOsI6NnzsXFsZhry4=",
"owner": "cachix", "owner": "cachix",
"repo": "git-hooks.nix", "repo": "git-hooks.nix",
"rev": "cc4d466cb1254af050ff7bdf47f6d404a7c646d1", "rev": "0ff4381bbb8f7a52ca4a851660fc7a437a4c6e07",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -308,11 +296,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1717525419, "lastModified": 1719827439,
"narHash": "sha256-5z2422pzWnPXHgq2ms8lcCfttM0dz+hg+x1pCcNkAws=", "narHash": "sha256-tneHOIv1lEavZ0vQ+rgz67LPNCgOZVByYki3OkSshFU=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "a7117efb3725e6197dd95424136f79147aa35e5b", "rev": "59ce796b2563e19821361abbe2067c3bb4143a7d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -330,11 +318,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1716993688, "lastModified": 1719845423,
"narHash": "sha256-vo5k2wQekfeoq/2aleQkBN41dQiQHNTniZeVONWiWLs=", "narHash": "sha256-ZLHDmWAsHQQKnmfyhYSHJDlt8Wfjv6SQhl2qek42O7A=",
"owner": "lnl7", "owner": "lnl7",
"repo": "nix-darwin", "repo": "nix-darwin",
"rev": "c0d5b8c54d6828516c97f6be9f2d00c63a363df4", "rev": "ec12b88104d6c117871fad55e931addac4626756",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -413,23 +401,23 @@
}, },
"nixpkgs-lib": { "nixpkgs-lib": {
"locked": { "locked": {
"lastModified": 1717284937, "lastModified": 1719876945,
"narHash": "sha256-lIbdfCsf8LMFloheeE6N31+BMIeixqyQWbSr2vk79EQ=", "narHash": "sha256-Fm2rDDs86sHy0/1jxTOKB1118Q0O3Uc7EC0iXvXKpbI=",
"type": "tarball", "type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/eb9ceca17df2ea50a250b6b27f7bf6ab0186f198.tar.gz" "url": "https://github.com/NixOS/nixpkgs/archive/5daf0514482af3f97abaefc78a6606365c9108e2.tar.gz"
}, },
"original": { "original": {
"type": "tarball", "type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/eb9ceca17df2ea50a250b6b27f7bf6ab0186f198.tar.gz" "url": "https://github.com/NixOS/nixpkgs/archive/5daf0514482af3f97abaefc78a6606365c9108e2.tar.gz"
} }
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1717786204, "lastModified": 1719848872,
"narHash": "sha256-4q0s6m0GUcN7q+Y2DqD27iLvbcd1G50T2lv08kKxkSI=", "narHash": "sha256-H3+EC5cYuq+gQW8y0lSrrDZfH71LB4DAf+TDFyvwCNA=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "051f920625ab5aabe37c920346e3e69d7d34400e", "rev": "00d80d13810dbfea8ab4ed1009b09100cca86ba8",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -448,11 +436,11 @@
"nixvim": "nixvim_2" "nixvim": "nixvim_2"
}, },
"locked": { "locked": {
"lastModified": 1718509257, "lastModified": 1720589894,
"narHash": "sha256-9kLFRo2o92cboxNVfbxOrpPnf8jICC7pdc1Fd6DQn2s=", "narHash": "sha256-2+JGFQOYA4zNQ2DiMcsF5OYOj9ZxBaav+jnn3uoXL+M=",
"owner": "alejandro-angulo", "owner": "alejandro-angulo",
"repo": "nixvim-config", "repo": "nixvim-config",
"rev": "94623de18ea509d3749418f387c85992b785b043", "rev": "ce4e765348d77101e15303a7fc5b0f25ce5cd9cd",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -473,11 +461,11 @@
"treefmt-nix": "treefmt-nix" "treefmt-nix": "treefmt-nix"
}, },
"locked": { "locked": {
"lastModified": 1718098450, "lastModified": 1720530938,
"narHash": "sha256-QDKPhT61Cf82/7G7vMyEfKQSIGGzs33FyT+4RB34spo=", "narHash": "sha256-kUmpiyPfVFKPPLKfq3p50ddi6MdwcW7g4IqM8b7bRxg=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixvim", "repo": "nixvim",
"rev": "7a2d065ccec902c17db71bd2ba3e485a0952f43b", "rev": "a5e9dbdef1530a76056db12387d489a68eea6f80",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -500,7 +488,7 @@
}, },
"snowfall-lib": { "snowfall-lib": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_4", "flake-compat": "flake-compat_3",
"flake-utils-plus": "flake-utils-plus", "flake-utils-plus": "flake-utils-plus",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
@ -590,11 +578,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1717850719, "lastModified": 1719887753,
"narHash": "sha256-npYqVg+Wk4oxnWrnVG7416fpfrlRhp/lQ6wQ4DHI8YE=", "narHash": "sha256-p0B2r98UtZzRDM5miGRafL4h7TwGRC4DII+XXHDHqek=",
"owner": "numtide", "owner": "numtide",
"repo": "treefmt-nix", "repo": "treefmt-nix",
"rev": "4fc1c45a5f50169f9f29f6a98a438fb910b834ed", "rev": "bdb6355009562d8f9313d9460c0d3860f525bc6c",
"type": "github" "type": "github"
}, },
"original": { "original": {

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, pkgs,
config,
lib, lib,
... ...
}: }:
@ -45,6 +44,7 @@ in {
"memory" "memory"
"backlight" "backlight"
"network" "network"
"custom/notification"
"tray" "tray"
]; ];
@ -141,6 +141,26 @@ in {
tooltip-format = "{essid} {signalStrength}%"; 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 = { tray = {
spacing = 10; spacing = 10;
}; };

View file

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

View file

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