Fixed battery widget on lock screen
This commit is contained in:
parent
d0050626da
commit
e63a49c8c1
1 changed files with 19 additions and 25 deletions
|
|
@ -56,8 +56,14 @@
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
command = [
|
command = [
|
||||||
"${lib.getExe pkgs.eww}"
|
"${lib.getExe pkgs.networkmanagerapplet}"
|
||||||
"daemon"
|
];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
command = [
|
||||||
|
"dbus-update-activation-environment"
|
||||||
|
"--systemd"
|
||||||
|
"--all"
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
|
@ -228,10 +234,11 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
services.swayidle = let
|
services.hypridle = let
|
||||||
niri = lib.getExe config.programs.niri.package;
|
niri = lib.getExe config.programs.niri.package;
|
||||||
loginctl = "${pkgs.systemd}/bin/loginctl";
|
loginctl = "${pkgs.systemd}/bin/loginctl";
|
||||||
locking-script = "pidof hyprlock || ${lib.getExe pkgs.hyprlock}";
|
pidof = "${pkgs.procps}/bin/pidof";
|
||||||
|
locking-script = "${pidof} hyprlock || ${lib.getExe pkgs.hyprlock}";
|
||||||
systemctl = "${pkgs.systemd}/bin/systemctl";
|
systemctl = "${pkgs.systemd}/bin/systemctl";
|
||||||
#locking-script = "${pkgs.swaylock}/bin/swaylock --daemonize";
|
#locking-script = "${pkgs.swaylock}/bin/swaylock --daemonize";
|
||||||
#unlocking-script = "pkill -SIGUSR1 swaylock";
|
#unlocking-script = "pkill -SIGUSR1 swaylock";
|
||||||
|
|
@ -245,25 +252,12 @@
|
||||||
'';
|
'';
|
||||||
in{
|
in{
|
||||||
enable = true;
|
enable = true;
|
||||||
events = [
|
settings.general = {
|
||||||
{
|
before_sleep_cmd = "${pidof} hyprlock || ${loginctl} lock-session;#${niri} msg action power-off-monitors";
|
||||||
event = "before-sleep";
|
after_sleep_cmd = "#${niri} msg action power-on-monitors";
|
||||||
command = "pidof hyprlock || ${loginctl} lock-session;#${niri} msg action power-off-monitors";
|
lock_cmd = "${locking-script}";
|
||||||
}
|
};
|
||||||
{
|
settings.listener = let
|
||||||
event = "after-resume";
|
|
||||||
command = "#${niri} msg action power-on-monitors";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
event = "lock";
|
|
||||||
command = "${locking-script}";
|
|
||||||
}
|
|
||||||
#{
|
|
||||||
# event = "unlock";
|
|
||||||
# command = "${unlocking-script}";
|
|
||||||
#}
|
|
||||||
];
|
|
||||||
timeouts = let
|
|
||||||
secondary = "${systemctl} suspend";
|
secondary = "${systemctl} suspend";
|
||||||
in lib.mkIf (hwconfig.isLaptop) [
|
in lib.mkIf (hwconfig.isLaptop) [
|
||||||
#{
|
#{
|
||||||
|
|
@ -272,11 +266,11 @@ in{
|
||||||
#}
|
#}
|
||||||
{
|
{
|
||||||
timeout = 870;
|
timeout = 870;
|
||||||
command = "${suspendScript ''${pkgs.libnotify}/bin/notify-send "You are idle. Going to sleep in 30 seconds"''}";
|
on-timeout = "${suspendScript ''${pkgs.libnotify}/bin/notify-send "You are idle. Going to sleep in 30 seconds"''}";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
timeout = 900;
|
timeout = 900;
|
||||||
command = "${suspendScript "${systemctl} suspend"}";
|
on-timeout = "${suspendScript "${systemctl} suspend"}";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue