Update modules/users.nix modules/workspace/i3/default.nix
This commit is contained in:
parent
39264dc7bf
commit
0f35653f9d
@ -37,17 +37,9 @@
|
|||||||
"/run/user/1000";
|
"/run/user/1000";
|
||||||
|
|
||||||
services.udev.extraRules = ''
|
services.udev.extraRules = ''
|
||||||
ACTION=="remove", ATTRS{idVendor}=="1050", RUN+="${pkgs.systemd}/bin/systemctl start swaylock"
|
ACTION=="remove", ATTRS{idVendor}=="1050", RUN+="${pkgs.systemd}/bin/loginctl lock-sessions"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
systemd.services.swaylock = {
|
|
||||||
description = "Lock the screen";
|
|
||||||
serviceConfig.User = "balsoft";
|
|
||||||
environment.XDG_RUNTIME_DIR = "/run/user/1000";
|
|
||||||
path = [pkgs.swaylock];
|
|
||||||
script = "swaylock -c ${builtins.substring 1 7 config.themes.colors.bg}";
|
|
||||||
};
|
|
||||||
|
|
||||||
security.pam.u2f = {
|
security.pam.u2f = {
|
||||||
control = "sufficient";
|
control = "sufficient";
|
||||||
cue = true;
|
cue = true;
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
let
|
let
|
||||||
thm = config.themes.colors;
|
thm = config.themes.colors;
|
||||||
apps = config.defaultApplications;
|
apps = config.defaultApplications;
|
||||||
|
lock = "swaylock -c ${builtins.substring 1 7 thm.bg}";
|
||||||
in {
|
in {
|
||||||
environment.sessionVariables._JAVA_AWT_WM_NONREPARENTING = "1";
|
environment.sessionVariables._JAVA_AWT_WM_NONREPARENTING = "1";
|
||||||
|
|
||||||
@ -85,7 +86,7 @@ in {
|
|||||||
{ command = "${pkgs.cantata}/bin/cantata"; }
|
{ command = "${pkgs.cantata}/bin/cantata"; }
|
||||||
|
|
||||||
{
|
{
|
||||||
command = "swayidle -w before-sleep 'swaylock -f -c ${builtins.substring 1 7 thm.bg}'";
|
command = "swayidle before-sleep '${lock}' lock '${lock}' unlock 'pkill -9 swaylock'";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -161,9 +162,9 @@ in {
|
|||||||
"${modifier}+v" = "split v";
|
"${modifier}+v" = "split v";
|
||||||
"${modifier}+F1" = "move to scratchpad";
|
"${modifier}+F1" = "move to scratchpad";
|
||||||
"${modifier}+F2" = "scratchpad show";
|
"${modifier}+F2" = "scratchpad show";
|
||||||
"${modifier}+F11" = "exec swaylock -f -c ${builtins.substring 1 7 thm.bg}; output * dpms off";
|
"${modifier}+F11" = "exec ${lock}; output * dpms off";
|
||||||
"${modifier}+F12" = "output * dpms on";
|
"${modifier}+F12" = "output * dpms on";
|
||||||
"${modifier}+End" = "exec swaylock -f -c ${builtins.substring 1 7 thm.bg}";
|
"${modifier}+End" = "exec ${lock}";
|
||||||
"${modifier}+p" = "sticky toggle";
|
"${modifier}+p" = "sticky toggle";
|
||||||
"${modifier}+i" =
|
"${modifier}+i" =
|
||||||
script "0x0" ''wl-paste | curl -F"file=@-" https://0x0.st | wl-copy'';
|
script "0x0" ''wl-paste | curl -F"file=@-" https://0x0.st | wl-copy'';
|
||||||
|
Loading…
Reference in New Issue
Block a user