fix swaylock for allegro
This commit is contained in:
parent
e84a8ae2ef
commit
28336a7951
1 changed files with 11 additions and 6 deletions
17
ui.nix
17
ui.nix
|
|
@ -1,4 +1,4 @@
|
||||||
{ lib, config, pkgs, ... }:
|
{ lib, config, pkgs, variant, ... }:
|
||||||
let
|
let
|
||||||
defaultTerminal = "alacritty";
|
defaultTerminal = "alacritty";
|
||||||
alacrittyLightTheme = "${pkgs.alacritty-theme}/night_owlish_light.toml";
|
alacrittyLightTheme = "${pkgs.alacritty-theme}/night_owlish_light.toml";
|
||||||
|
|
@ -108,12 +108,17 @@ in
|
||||||
mimeApps.defaultApplications."TerminalEmulator" = "Alacritty.desktop";
|
mimeApps.defaultApplications."TerminalEmulator" = "Alacritty.desktop";
|
||||||
};
|
};
|
||||||
|
|
||||||
services.swayidle = {
|
services.swayidle =
|
||||||
|
let swaylock-bin = (if variant == "allegro"
|
||||||
|
then "/usr/bin/swaylock"
|
||||||
|
else "${config.programs.swaylock.package}/bin/swaylock");
|
||||||
|
in
|
||||||
|
{
|
||||||
enable = true;
|
enable = true;
|
||||||
events = [
|
events = [
|
||||||
{
|
{
|
||||||
event = "before-sleep";
|
event = "before-sleep";
|
||||||
command = "${config.programs.swaylock.package}/bin/swaylock -defF";
|
command = "${swaylock-bin} -defF";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
event = "after-resume";
|
event = "after-resume";
|
||||||
|
|
@ -121,14 +126,14 @@ in
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
event = "lock";
|
event = "lock";
|
||||||
command = "${config.programs.swaylock.package}/bin/swaylock -defF";
|
command = "${swaylock-bin} -defF";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
timeouts = [
|
timeouts = [
|
||||||
{
|
{
|
||||||
timeout = 900;
|
timeout = 900;
|
||||||
command = "${config.programs.swaylock.package}/bin/swaylock -defF";
|
command = "${swaylock-bin} -defF";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
timeout = 900;
|
timeout = 900;
|
||||||
|
|
@ -138,7 +143,7 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.swaylock = {
|
programs.swaylock = {
|
||||||
enable = true;
|
enable = (variant != "allegro");
|
||||||
package = pkgs.swaylock-effects;
|
package = pkgs.swaylock-effects;
|
||||||
settings = {
|
settings = {
|
||||||
screenshots = true;
|
screenshots = true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue