mako: extract from sway config
This commit is contained in:
parent
1036602b03
commit
f26b404d9d
|
@ -19,8 +19,9 @@ let
|
|||
'';
|
||||
in
|
||||
{
|
||||
imports = [ ./theme.nix ];
|
||||
imports = [ ./theme.nix ./mako.nix ];
|
||||
config = {
|
||||
programs.mako.enable = true;
|
||||
wayland.windowManager.sway =
|
||||
let
|
||||
mod = "Mod4";
|
||||
|
@ -430,41 +431,6 @@ in
|
|||
};
|
||||
};
|
||||
};
|
||||
programs.mako = {
|
||||
enable = true;
|
||||
borderSize = 2;
|
||||
padding = "5";
|
||||
margin = "15";
|
||||
layer = "overlay";
|
||||
|
||||
font = "${font.interface} ${toString font.size.small}";
|
||||
textColor = color.txt;
|
||||
|
||||
backgroundColor = color.bg;
|
||||
borderColor = accent.color;
|
||||
progressColor = "over ${accent.color}88";
|
||||
|
||||
defaultTimeout = 10000;
|
||||
|
||||
extraConfig = ''
|
||||
[app-name=volumesh]
|
||||
default-timeout=5000
|
||||
group-by=app-name
|
||||
format=<b>%s</b>\n%b
|
||||
'';
|
||||
|
||||
# # {{@@ header() @@}}
|
||||
# # text
|
||||
|
||||
# # features
|
||||
# icons=1
|
||||
# markup=1
|
||||
# actions=1
|
||||
# default-timeout=10000
|
||||
|
||||
# # position
|
||||
# layer=overlay
|
||||
};
|
||||
home.packages = with pkgs; [
|
||||
sway
|
||||
swaybg
|
||||
|
@ -494,20 +460,6 @@ in
|
|||
|
||||
mpvpaper
|
||||
];
|
||||
systemd.user.services = {
|
||||
mako = {
|
||||
Unit = {
|
||||
Description = "Notification daemon";
|
||||
PartOf = [ "graphical-session.target" ];
|
||||
After = [ "graphical-session.target" ];
|
||||
};
|
||||
Service = {
|
||||
ExecStart = "${pkgs.mako}/bin/mako";
|
||||
Restart = "on-failure";
|
||||
};
|
||||
Install = { WantedBy = [ "sway-session.target" ]; };
|
||||
};
|
||||
};
|
||||
home.sessionVariables = {
|
||||
LD_PRELOAD = "${pkgs.gtk3-nocsd}/lib/libgtk3-nocsd.so.0";
|
||||
GTK_CSD = "0";
|
||||
|
|
53
user/sway/mako.nix
Normal file
53
user/sway/mako.nix
Normal file
|
@ -0,0 +1,53 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
inherit (pkgs.uservars) key accent font theme;
|
||||
inherit (theme) color;
|
||||
in
|
||||
{
|
||||
programs.mako = {
|
||||
borderSize = 2;
|
||||
padding = "5";
|
||||
margin = "15";
|
||||
layer = "overlay";
|
||||
|
||||
font = "${font.interface} ${toString font.size.small}";
|
||||
textColor = color.txt;
|
||||
|
||||
backgroundColor = color.bg;
|
||||
borderColor = accent.color;
|
||||
progressColor = "over ${accent.color}88";
|
||||
|
||||
defaultTimeout = 10000;
|
||||
|
||||
extraConfig = ''
|
||||
[app-name=volumesh]
|
||||
default-timeout=5000
|
||||
group-by=app-name
|
||||
format=<b>%s</b>\n%b
|
||||
'';
|
||||
|
||||
# # {{@@ header() @@}}
|
||||
# # text
|
||||
|
||||
# # features
|
||||
# icons=1
|
||||
# markup=1
|
||||
# actions=1
|
||||
# default-timeout=10000
|
||||
|
||||
# # position
|
||||
# layer=overlay
|
||||
};
|
||||
systemd.user.services.mako = lib.mkIf (config.programs.mako.enable) {
|
||||
Unit = {
|
||||
Description = "Notification daemon";
|
||||
PartOf = [ "graphical-session.target" ];
|
||||
After = [ "graphical-session.target" ];
|
||||
};
|
||||
Service = {
|
||||
ExecStart = "${pkgs.mako}/bin/mako";
|
||||
Restart = "on-failure";
|
||||
};
|
||||
Install = { WantedBy = [ "sway-session.target" ]; };
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue