add sway{lock, idle}
This commit is contained in:
parent
7cc67eda0f
commit
d5c176c68b
4 changed files with 26 additions and 1 deletions
|
|
@ -13,5 +13,6 @@
|
|||
];
|
||||
};
|
||||
users.groups.plugdev = {};
|
||||
security.pam.services.swaylock = {};
|
||||
system.stateVersion = "22.11";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ in
|
|||
};
|
||||
};
|
||||
home-manager.users.${username} = {
|
||||
programs.home-manager.enable = true;
|
||||
imports = [
|
||||
./home.nix
|
||||
./t14/home.nix
|
||||
|
|
|
|||
|
|
@ -10,5 +10,6 @@
|
|||
ripgrep
|
||||
];
|
||||
};
|
||||
systemd.user.startServices = "sd-switch";
|
||||
xdg.enable = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
{ home-manager, username, config, lib, pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
wl-clipboard
|
||||
|
|
@ -65,6 +65,7 @@
|
|||
"${modifier}+space" = "exec ${pkgs.dmenu}/bin/dmenu_path | ${pkgs.dmenu}/bin/dmenu | ${pkgs.findutils}/bin/xargs swaymsg exec --";
|
||||
"${modifier}+bracketleft" = "exec --no-startup-id grimshot --notify save area /tmp/scrot-$(date \"+%Y-%m-%d\"T\"%H:%M:%S\").png";
|
||||
"${modifier}+bracketright" = "exec --no-startup-id grimshot --notify copy area";
|
||||
"${modifier}+Shift+Ctrl+l" = "exec loginctl lock-session";
|
||||
"XF86MonBrightnessDown" = "exec light -U 10";
|
||||
"XF86MonBrightnessUp" = "exec light -A 10";
|
||||
"XF86AudioRaiseVolume" = "exec 'pactl set-sink-volume @DEFAULT_SINK@ +1%'";
|
||||
|
|
@ -182,4 +183,25 @@
|
|||
};
|
||||
};
|
||||
};
|
||||
programs.swaylock = {
|
||||
enable = true;
|
||||
settings = {
|
||||
color = "#764783";
|
||||
daemonize = true;
|
||||
clock = true;
|
||||
ignore-empty-password = true;
|
||||
};
|
||||
};
|
||||
services.swayidle = {
|
||||
enable = true;
|
||||
events = [
|
||||
{ event = "lock"; command = "${pkgs.swaylock}/bin/swaylock";}
|
||||
{ event = "before-sleep"; command = "${pkgs.swaylock}/bin/swaylock";}
|
||||
{ event = "after-resume"; command = "${pkgs.sway}/bin/swaymsg \"output * power on\"";}
|
||||
];
|
||||
timeouts = [
|
||||
{ timeout = 600; command = "${pkgs.swaylock}/bin/swaylock";}
|
||||
{ timeout = 1200; command = "${pkgs.sway}/bin/swaymsg \"output * power off\"";}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue