mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2025-12-06 09:07:21 +01:00
chore[work]: improve suspend behaviour
This commit is contained in:
parent
9da6bd15ab
commit
e07b3c2b6e
9 changed files with 221 additions and 75 deletions
|
|
@ -7,6 +7,18 @@ in
|
|||
config = lib.mkIf config.swarselmodules.${moduleName} {
|
||||
services.${moduleName} = {
|
||||
enable = true;
|
||||
extraArgs = [
|
||||
"-W"
|
||||
" Consider charging the battery"
|
||||
"-C"
|
||||
" Battery is low; plug in charger now"
|
||||
"-D"
|
||||
" Device will lose power in a few seconds"
|
||||
"-c"
|
||||
"10"
|
||||
"-d"
|
||||
"5"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -53,7 +53,10 @@
|
|||
in
|
||||
{
|
||||
name = "lidopen";
|
||||
exec = [ "${pkgs.swaybg}/bin/swaybg --output '${monitor}' --image ${self}/files/wallpaper/standwp.png --mode ${config.stylix.imageScalingMode}" ];
|
||||
exec = [
|
||||
"${pkgs.swaybg}/bin/swaybg --output '${config.swarselsystems.sharescreen}' --image ${config.swarselsystems.wallpaper} --mode ${config.stylix.imageScalingMode}"
|
||||
"${pkgs.swaybg}/bin/swaybg --output '${monitor}' --image ${self}/files/wallpaper/standwp.png --mode ${config.stylix.imageScalingMode}"
|
||||
];
|
||||
outputs = [
|
||||
{
|
||||
criteria = config.swarselsystems.sharescreen;
|
||||
|
|
|
|||
|
|
@ -25,7 +25,53 @@
|
|||
sioyek.enable = true;
|
||||
swayr.enable = true;
|
||||
timidity.enable = true;
|
||||
wlogout.enable = true;
|
||||
wlogout = {
|
||||
enable = true;
|
||||
layout = [
|
||||
{
|
||||
label = "lock";
|
||||
action = "loginctl lock-session";
|
||||
text = "Lock";
|
||||
keybind = "l";
|
||||
circular = true;
|
||||
}
|
||||
{
|
||||
label = "hibernate";
|
||||
action = "systemctl hibernate";
|
||||
text = "Hibernate";
|
||||
keybind = "h";
|
||||
circular = true;
|
||||
}
|
||||
{
|
||||
label = "logout";
|
||||
action = "loginctl terminate-user $USER";
|
||||
text = "Logout";
|
||||
keybind = "u";
|
||||
circular = true;
|
||||
}
|
||||
{
|
||||
label = "shutdown";
|
||||
action = "systemctl poweroff";
|
||||
text = "Shutdown";
|
||||
keybind = "p";
|
||||
circular = true;
|
||||
}
|
||||
{
|
||||
label = "suspend";
|
||||
action = "systemctl suspend";
|
||||
text = "Suspend";
|
||||
keybind = "s";
|
||||
circular = true;
|
||||
}
|
||||
{
|
||||
label = "reboot";
|
||||
action = "systemctl reboot";
|
||||
text = "Reboot";
|
||||
keybind = "r";
|
||||
circular = true;
|
||||
}
|
||||
];
|
||||
};
|
||||
yt-dlp.enable = true;
|
||||
zoxide = {
|
||||
enable = true;
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ in
|
|||
let
|
||||
brightnessctl = "${lib.getExe pkgs.brightnessctl}";
|
||||
swaylock = "${lib.getExe pkgs.swaylock-effects}";
|
||||
suspend = "${pkgs.systemd}/bin/systemctl";
|
||||
suspend = "${pkgs.systemd}/bin/systemctl suspend";
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
|
|
@ -24,6 +24,7 @@ in
|
|||
];
|
||||
events = [
|
||||
# { event = "before-sleep"; command = "${lib.getExe pkgs.swaylock-effects} -f --screenshots --clock --effect-blur 7x5 --effect-vignette 0.5:0.5 --fade-in 0.2"; }
|
||||
# { event = "after-resume"; command = "${swaylock} -f "; }
|
||||
{ event = "before-sleep"; command = "${swaylock} -f "; }
|
||||
{ event = "lock"; command = "${swaylock} -f "; }
|
||||
];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue