swayidle under control
This commit is contained in:
parent
1e0c12efb5
commit
41241710fa
2 changed files with 202 additions and 187 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 '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
|
||||
|
||||
|
|
|
|||
|
|
@ -1,18 +1,7 @@
|
|||
{ inputs, outputs, ... }:
|
||||
{ inputs, pkgs, outputs, ... }:
|
||||
{
|
||||
# xdg.configFile."sway/config".source = files/sway/${inputs.networking.hostName};
|
||||
xdg.configFile."sway/config".source = files/sway/default;
|
||||
programs.swaylock = {
|
||||
enable = true;
|
||||
settings = {
|
||||
ignore-empty-password = true;
|
||||
daemonize = true;
|
||||
indicator-radius = "100";
|
||||
scaling = "fill";
|
||||
#fade-in = "3";
|
||||
#effect-blur = "3x10";
|
||||
};
|
||||
};
|
||||
# services.wayland-pipewire-idle-inhibit = {
|
||||
# enable = true;
|
||||
# systemdTarget = "sway-session.target";
|
||||
|
|
@ -26,7 +15,32 @@
|
|||
# ];
|
||||
# };
|
||||
# };
|
||||
programs.waybar = {
|
||||
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;
|
||||
settings = {
|
||||
ignore-empty-password = true;
|
||||
daemonize = true;
|
||||
indicator-radius = "100";
|
||||
scaling = "fill";
|
||||
#fade-in = "3";
|
||||
#effect-blur = "3x10";
|
||||
};
|
||||
};
|
||||
waybar = {
|
||||
enable = true;
|
||||
settings = {
|
||||
mainBar = {
|
||||
|
|
@ -199,4 +213,5 @@
|
|||
#idle_inhibitor.activated { background-color: #ecf0f1; color: #2d3436; }
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue