From d39ef376b3f124335c3907864e3ff2f0dd7da2f8 Mon Sep 17 00:00:00 2001 From: Don Harper Date: Sun, 28 Apr 2024 09:19:54 -0500 Subject: [PATCH] home | swayidle as a service did not work --- home/gui/files/sway/smaug | 10 +++++----- home/gui/sway.nix | 16 +--------------- 2 files changed, 6 insertions(+), 20 deletions(-) diff --git a/home/gui/files/sway/smaug b/home/gui/files/sway/smaug index e338071..807fe13 100644 --- a/home/gui/files/sway/smaug +++ b/home/gui/files/sway/smaug @@ -4,11 +4,11 @@ set $snd_sink alsa_output.usb-Corsair_CORSAIR_VOID_ELITE_Wireless_Gaming_Dongle- set $lock /home/don/bin/lock.sh #set $lock 'swaylock -f -c 000000' -#exec swayidle -w \ -# timeout 300 $lock \ -# timeout 360 'swaymsg "output * dpms off"' \ -# resume 'swaymsg "output * dpms on"' \ -# before-sleep $lock +exec swayidle -w \ + timeout 300 $lock \ + timeout 360 'swaymsg "output * dpms off"' \ + resume 'swaymsg "output * dpms on"' \ + before-sleep $lock floating_modifier $mod diff --git a/home/gui/sway.nix b/home/gui/sway.nix index 0c52906..4791279 100644 --- a/home/gui/sway.nix +++ b/home/gui/sway.nix @@ -1,21 +1,7 @@ { inputs, pkgs, hostname, outputs, osConfig, ... }: { xdg.configFile."sway/config".source = ./files/sway/${osConfig.networking.hostName}; - - services = { - swayidle = { - enable = true; - timeouts = [ - { timeout = 300; command = "/home/bin/don/lock.sh"; } - { timeout = 360; command = "${pkgs.sway}/bin/swaymsg 'output * dpms off'"; } - ]; - events = [ - { event = "after-resume"; command = "${pkgs.sway}/bin/swaymsg 'output * dpms on'"; } - { event = "before-sleep"; command = "/home/bin/don/lock.sh"; } - ]; - }; - }; - + programs = { swaylock = { enable = true;