From 2fad761a31c4810a42a0b8142cccb8eb550d8f9c Mon Sep 17 00:00:00 2001 From: DeveloperDurp Date: Wed, 5 Jun 2024 17:50:14 -0500 Subject: [PATCH] update --- .config/sway/config | 12 ++++++------ .config/systemd/user/sway-session.target | 6 ++++++ .../sway-session.target.wants/swayidle.service | 1 + .config/systemd/user/swayidle.service | 16 ++++++++++++++++ 4 files changed, 29 insertions(+), 6 deletions(-) create mode 100644 .config/systemd/user/sway-session.target create mode 120000 .config/systemd/user/sway-session.target.wants/swayidle.service create mode 100644 .config/systemd/user/swayidle.service diff --git a/.config/sway/config b/.config/sway/config index 589a4c0..0ec2f70 100644 --- a/.config/sway/config +++ b/.config/sway/config @@ -14,12 +14,12 @@ output * bg ~/.config/configfiles/wallpaper.png fill exec_always "pkill kanshi; kanshi" ### Idle configuration -exec pkill swayidle -exec swayidle -w \ - timeout 300 'swaylock -f -c 000000 -i ~/.config/configfiles/lockscreen.jpg' \ - timeout 600 'swaymsg "output * dpms off"' \ - resume 'swaymsg "output * dpms on"' \ - before-sleep 'swaylock -f -c 000000 -i ~/.config/configfiles/lockscreen.jpg' +#exec_always pkill swayidle +#exec swayidle -w \ +# timeout 300 'swaylock -f' \ +# timeout 600 'swaymsg "output * dpms off"' \ +# resume 'swaymsg "output * dpms on"' \ +# before-sleep 'swaylock -f' ### Input configuration input "1267:12573:ELAN0412:00_04F3:311D_Touchpad" { diff --git a/.config/systemd/user/sway-session.target b/.config/systemd/user/sway-session.target new file mode 100644 index 0000000..30151b3 --- /dev/null +++ b/.config/systemd/user/sway-session.target @@ -0,0 +1,6 @@ +[Unit] +Description=sway compositor session +Documentation=man:systemd.special(7) +BindsTo=graphical-session.target +Wants=graphical-session-pre.target +After=graphical-session-pre.target diff --git a/.config/systemd/user/sway-session.target.wants/swayidle.service b/.config/systemd/user/sway-session.target.wants/swayidle.service new file mode 120000 index 0000000..a308b98 --- /dev/null +++ b/.config/systemd/user/sway-session.target.wants/swayidle.service @@ -0,0 +1 @@ +/home/user/.config/systemd/user/swayidle.service \ No newline at end of file diff --git a/.config/systemd/user/swayidle.service b/.config/systemd/user/swayidle.service new file mode 100644 index 0000000..4d6d75c --- /dev/null +++ b/.config/systemd/user/swayidle.service @@ -0,0 +1,16 @@ +[Unit] +Description=Idle manager for Wayland +Documentation=man:swayidle(1) +PartOf=graphical-session.target + +[Service] +Type=simple +ExecStart=/usr/bin/swayidle -w \ + timeout 300 'swaylock -f -c 000000' \ + timeout 600 'swaymsg "output * dpms off"' \ + resume 'swaymsg "output * dpms on"' \ + before-sleep 'swaylock -f -c 000000' +ExecStartPost=/usr/bin/sleep 1 + +[Install] +WantedBy=sway-session.target