fix niri
This commit is contained in:
parent
db11846811
commit
67c2117563
16 changed files with 652 additions and 274 deletions
|
|
@ -6,13 +6,6 @@
|
|||
}:
|
||||
let
|
||||
cfg = config.xyno.desktop.swayidle;
|
||||
makoConf = pkgs.writeText "mako.conf" ''
|
||||
font=Source Sans Pro Nerd Font 11
|
||||
background-color=#1d2021ff
|
||||
border-color=#3c3836FF
|
||||
text-color=#ebdbb2ff
|
||||
progress-color=over #928374FF
|
||||
'';
|
||||
in
|
||||
{
|
||||
options.xyno.desktop.swayidle.enable = lib.mkEnableOption "enable swayidle and swaylock and stuff";
|
||||
|
|
@ -30,19 +23,18 @@ in
|
|||
};
|
||||
options.xyno.desktop.swayidle.swaylockArgs = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "--fade-in 2 --clock --timestr %T%z --datestr %F";
|
||||
default = "-f --fade-in 2 --clock --timestr %T%z --datestr %F -i /home/${config.xyno.system.user.name}/Pictures/background.jpg";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.systemPackages = with cfg; [ package swaylockPackage ];
|
||||
systemd.user.services.mako = {
|
||||
systemd.user.services.swayidle = {
|
||||
unitConfig.PartOf = "graphical-session.target";
|
||||
unitConfig.After = "graphical-session.target";
|
||||
unitConfig.Requisite = "graphical-session.target";
|
||||
serviceConfig.Restart = "on-failure";
|
||||
wantedBy = [ cfg.wantedBy ];
|
||||
script = "${cfg.package}/bin/mako -c ${makoConf}";
|
||||
restartTrigers = makoConf;
|
||||
script = "${cfg.package}/bin/swayidle -w timeout 310 'niri msg action power-off-monitors' timeout 300 '${cfg.swaylockPackage}/bin/swaylock ${cfg.swaylockArgs}' before-sleep '${cfg.swaylockPackage}/bin/swaylock ${cfg.swaylockArgs}'";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue