aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorToby Vincent <tobyv@tobyvin.dev>2024-02-08 13:34:53 -0600
committerToby Vincent <tobyv@tobyvin.dev>2024-02-08 13:34:53 -0600
commit291838a426d4fdfc1bf085bf2b08c19cfea8c350 (patch)
treedbde26079bab044bad3171e667d97e3aca9dcb8a
parentd0783550c34e746a7c6c80dca474f194f2f559e4 (diff)
feat(sway): improve idle and lock handling
-rw-r--r--sway/.config/swayidle/config9
-rw-r--r--sway/.config/swaylock/config39
-rw-r--r--sway/.config/systemd/user/idle.target2
-rwxr-xr-xsway/.local/bin/lock18
4 files changed, 6 insertions, 62 deletions
diff --git a/sway/.config/swayidle/config b/sway/.config/swayidle/config
index f7f3091..37cd762 100644
--- a/sway/.config/swayidle/config
+++ b/sway/.config/swayidle/config
@@ -1,5 +1,4 @@
-timeout 600 'swaylock --grace 300'
-timeout 1200 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"'
-timeout 1800 'systemctl suspend'
-before-sleep 'swaylock'
-lock 'swaylock --grace 5'
+timeout 600 'systemctl --user start idle.target' resume 'systemctl --user stop idle.target'
+timeout 900 'loginctl lock-session'
+timeout 1200 'swaymsg "output * power off"' resume 'swaymsg "output * power on"'
+idlehint 1800
diff --git a/sway/.config/swaylock/config b/sway/.config/swaylock/config
deleted file mode 100644
index be23ef1..0000000
--- a/sway/.config/swaylock/config
+++ /dev/null
@@ -1,39 +0,0 @@
-daemonize
-fade-in=1
-screenshots
-clock
-submit-on-touch
-indicator
-indicator-idle-visible
-indicator-radius=100
-indicator-thickness=7
-effect-blur=7x5
-effect-vignette=0.5:0.5
-ring-color=bb00cc
-key-hl-color=880033
-line-color=00000000
-inside-color=00000088
-separator-color=00000000
-
-#key-hl-color=ebdbb2
-#inside-color=28282888
-#inside-clear-color=d7992188
-#inside-caps-lock-color=45858888
-#inside-ver-color=45858888
-#inside-wrong-color=cc241d88
-#line-color=00000000
-#line-clear-color=00000000
-#line-caps-lock-color=00000000
-#line-ver-color=00000000
-#line-wrong-color=00000000
-#ring-color=d65d0e
-#ring-clear-color=d65d0e
-#ring-caps-lock-color=d65d0e
-#ring-ver-color=d65d0e
-#ring-wrong-color=d65d0e
-#text-color=ebdbb2
-#text-clear-color=ebdbb2
-#text-caps-lock-color=ebdbb2
-#text-ver-color=ebdbb2
-#text-wrong-color=ebdbb2
-#separator-color=00000000
diff --git a/sway/.config/systemd/user/idle.target b/sway/.config/systemd/user/idle.target
new file mode 100644
index 0000000..3038404
--- /dev/null
+++ b/sway/.config/systemd/user/idle.target
@@ -0,0 +1,2 @@
+[Unit]
+Description=Idle idicator
diff --git a/sway/.local/bin/lock b/sway/.local/bin/lock
deleted file mode 100755
index 5523061..0000000
--- a/sway/.local/bin/lock
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/usr/bin/env bash
-
-swaylock \
- --daemonize \
- --screenshots \
- --clock \
- --indicator \
- --indicator-radius 100 \
- --indicator-thickness 7 \
- --effect-blur 7x5 \
- --effect-vignette 0.5:0.5 \
- --ring-color bb00cc \
- --key-hl-color 880033 \
- --line-color 00000000 \
- --inside-color 00000088 \
- --separator-color 00000000 \
- --grace 10 \
- --fade-in 1