From 4338983aff9e6bbd0cf4f0f64d79c199cd15d85b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki?= Date: Sat, 1 Aug 2020 18:05:39 +0100 Subject: [PATCH] autoresume --- nixos/sway/default.nix | 2 +- nixos/sway/keybindings.nix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nixos/sway/default.nix b/nixos/sway/default.nix index cb3985ea..2b06705b 100644 --- a/nixos/sway/default.nix +++ b/nixos/sway/default.nix @@ -45,7 +45,7 @@ in startup = [ { 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 "output * dpms off"' resume 'swaymsg "output * dpms on"' before-sleep 'swaylock -f -c 000000' + { command = ''swayidle -w timeout 300 'swaylock -f -c 000000' timeout 600 'swaymsg "output * dpms off" && systemctl suspend' resume 'swaymsg "output * dpms on"' before-sleep 'swaylock -f -c 657b83' ''; } ]; output.eDP-1.scale = "1.7"; diff --git a/nixos/sway/keybindings.nix b/nixos/sway/keybindings.nix index 4f1d0f81..a501ef31 100644 --- a/nixos/sway/keybindings.nix +++ b/nixos/sway/keybindings.nix @@ -7,7 +7,7 @@ in "${mod}+Shift+e" = "exit"; "${mod}+Shift+c" = "reload"; "${mod}+Shift+r" = "restart"; - "${mod}+Shift+l" = "exec swaylock"; + "${mod}+Shift+l" = "exec swaylock -c 657b83"; "${mod}+Return" = "exec ${pkgs.alacritty}/bin/alacritty"; "XF86AudioRaiseVolume" = "exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +5%";