From 99eb1ff5f1fc92e52a1f08b4480e5bd3f51aa683 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki?= Date: Sat, 1 Aug 2020 17:08:51 +0100 Subject: [PATCH] add swayidle --- nixos/sway/default.nix | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/nixos/sway/default.nix b/nixos/sway/default.nix index 6177663b..6ba546d0 100644 --- a/nixos/sway/default.nix +++ b/nixos/sway/default.nix @@ -43,12 +43,10 @@ in } ]; startup = [ - { - command = "${pkgs.wl-clipboard}/bin/wl-paste -t text --watch ${pkgs.clipman}/bin/clipman store"; - } - { - command = "${pkgs.clipman}/bin/clipman restore"; - } + { command = "${pkgs.wl-clipboard}/bin/wl-paste -t text --watch ${pkgs.clipman}/bin/clipman store"; } + { command = "${pkgs.clipman}/bin/clipman restore"; } + { command = ''swayidle -w timeout 300 'swaylock -f -c 000000' timeout 600 'swaymsg "outout * dpms off"' resume 'swaymsg "outout * dpms off"' before-sleep 'swaylock -f -c 000000' + ''; } ]; output.eDP-1.scale = "1.7"; input."1:1:AT_Translated_Set_2_keyboard" = {