Use swayidle service module instead of launching manually
This commit is contained in:
parent
f04c7d0d64
commit
bd42955da6
1 changed files with 16 additions and 2 deletions
|
@ -230,11 +230,12 @@ in
|
||||||
for_window [shell="xwayland"] title_format "%title [XWayland]"
|
for_window [shell="xwayland"] title_format "%title [XWayland]"
|
||||||
|
|
||||||
exec --no-startup-id ${pkgs.networkmanagerapplet}/bin/nm-applet --indicator
|
exec --no-startup-id ${pkgs.networkmanagerapplet}/bin/nm-applet --indicator
|
||||||
exec --no-startup-id ${pkgs.swayidle}/bin/swayidle -w timeout 900 "${swaylockcmd}"
|
|
||||||
exec --no-startup-id ${pkgs.swayidle}/bin/swayidle -w timeout 1200 "${pkgs.sway}/bin/swaymsg 'output * dpms off'" resume "${pkgs.sway}/bin/swaymsg 'output * dpms on'"
|
|
||||||
|
|
||||||
include /etc/sway/config.d/*
|
include /etc/sway/config.d/*
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
# exec --no-startup-id ${pkgs.swayidle}/bin/swayidle -w timeout 900 "${swaylockcmd}"
|
||||||
|
# exec --no-startup-id ${pkgs.swayidle}/bin/swayidle -w timeout 1200 "${pkgs.sway}/bin/swaymsg 'output * dpms off'" resume "${pkgs.sway}/bin/swaymsg 'output * dpms on'"
|
||||||
# exec_always --no-startup-id systemctl --user import-environment _JAVA_AWT_WM_NONREPARENTING MOZ_ENABLE_WAYLAND MOZ_DBUS_REMOTE QT_QPA_PLATFORM QT_WAYLAND_DISABLE_WINDOWDECORATION QT_QPA_PLATFORMTHEME SDL_VIDEODRIVER SSH_AUTH_SOCK
|
# exec_always --no-startup-id systemctl --user import-environment _JAVA_AWT_WM_NONREPARENTING MOZ_ENABLE_WAYLAND MOZ_DBUS_REMOTE QT_QPA_PLATFORM QT_WAYLAND_DISABLE_WINDOWDECORATION QT_QPA_PLATFORMTHEME SDL_VIDEODRIVER SSH_AUTH_SOCK
|
||||||
# exec_always --no-startup-id dbus-update-activation-environment --systemd _JAVA_AWT_WM_NONREPARENTING MOZ_ENABLE_WAYLAND MOZ_DBUS_REMOTE QT_QPA_PLATFORM QT_WAYLAND_DISABLE_WINDOWDECORATION QT_QPA_PLATFORMTHEME SDL_VIDEODRIVER SSH_AUTH_SOCK
|
# exec_always --no-startup-id dbus-update-activation-environment --systemd _JAVA_AWT_WM_NONREPARENTING MOZ_ENABLE_WAYLAND MOZ_DBUS_REMOTE QT_QPA_PLATFORM QT_WAYLAND_DISABLE_WINDOWDECORATION QT_QPA_PLATFORMTHEME SDL_VIDEODRIVER SSH_AUTH_SOCK
|
||||||
|
|
||||||
|
@ -270,6 +271,19 @@ in
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
services = {
|
||||||
|
swayidle = {
|
||||||
|
enable = true;
|
||||||
|
events = [
|
||||||
|
{ event = "after-resume"; command = "${pkgs.sway}/bin/swaymsg 'output * dpms on'"; }
|
||||||
|
];
|
||||||
|
timeouts = [
|
||||||
|
{ timeout = 900; command = swaylockcmd; }
|
||||||
|
{ timeout = 1200; command = "${pkgs.sway}/bin/swaymsg 'output * dpms off'"; }
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
systemd.user.targets.tray = {
|
systemd.user.targets.tray = {
|
||||||
Unit = {
|
Unit = {
|
||||||
Description = "Home Manager System Tray";
|
Description = "Home Manager System Tray";
|
||||||
|
|
Loading…
Reference in a new issue