home | swayidle as a service did not work
This commit is contained in:
parent
210c7b020b
commit
d39ef376b3
2 changed files with 6 additions and 20 deletions
|
|
@ -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 /home/don/bin/lock.sh
|
||||||
#set $lock 'swaylock -f -c 000000'
|
#set $lock 'swaylock -f -c 000000'
|
||||||
#exec swayidle -w \
|
exec swayidle -w \
|
||||||
# timeout 300 $lock \
|
timeout 300 $lock \
|
||||||
# timeout 360 'swaymsg "output * dpms off"' \
|
timeout 360 'swaymsg "output * dpms off"' \
|
||||||
# resume 'swaymsg "output * dpms on"' \
|
resume 'swaymsg "output * dpms on"' \
|
||||||
# before-sleep $lock
|
before-sleep $lock
|
||||||
|
|
||||||
floating_modifier $mod
|
floating_modifier $mod
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,20 +2,6 @@
|
||||||
{
|
{
|
||||||
xdg.configFile."sway/config".source = ./files/sway/${osConfig.networking.hostName};
|
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 = {
|
programs = {
|
||||||
swaylock = {
|
swaylock = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue