revert swatidle back to sway/config

This commit is contained in:
Don Harper 2024-04-09 22:06:32 -05:00
parent e1bf0e4f93
commit 91391f9d86
3 changed files with 25 additions and 20 deletions

View file

@ -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

View file

@ -1,3 +1,4 @@
# POCKET2
set $mod Mod1
set $terminal_path /home/don/bin/mynewterm
set $snd_sink alsa_output.usb-Corsair_CORSAIR_VOID_ELITE_Wireless_Gaming_Dongle-00.iec958-stereo

View file

@ -1,7 +1,11 @@
{ inputs, pkgs, outputs, ... }:
{ inputs, pkgs, hostname, outputs, ... }:
{
# xdg.configFile."sway/config".source = files/sway/${inputs.networking.hostName};
xdg.configFile."sway/config".source = files/sway/default;
# xdg.configFile."sway/config".source = files/sway/${inputs.networking.hostName};
#xdg.configFile."sway/config".source = {hostname ? "default"}: ./files/sway/${hostname};
# xdg.configFile."sway/config".source = if builtins.pathExists ./files/sway/${inputs.networking.hostName} then ./files/sway/${inputs.networking.hostName} else ./files/sway/default ;
#xdg.configFile."sway/config".source = files/sway/default;
# services.wayland-pipewire-idle-inhibit = {
# enable = true;
# systemdTarget = "sway-session.target";
@ -15,19 +19,19 @@
# ];
# };
# };
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"; }
];
};
};
# 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;