Swayidle Configuration
- Add swayidle to startup - Change session lock to use `loginctl` - Swayidle interprets `loginctl lock-session` as `swaylock`
This commit is contained in:
15
README.org
15
README.org
@@ -3861,6 +3861,14 @@ adaptive_sync = false
|
|||||||
|
|
||||||
*** Lock Screen
|
*** Lock Screen
|
||||||
|
|
||||||
|
**** Swayidle
|
||||||
|
|
||||||
|
#+BEGIN_SRC conf :tangle swayidle/.config/swayidle/config
|
||||||
|
timeout 600 "~/.scripts/session.sh --lock"
|
||||||
|
before-sleep "~/.scripts/session.sh --lock"
|
||||||
|
lock "swaylock"
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
**** Swaylock
|
**** Swaylock
|
||||||
|
|
||||||
#+BEGIN_SRC conf :tangle swaylock/.config/swaylock/config
|
#+BEGIN_SRC conf :tangle swaylock/.config/swaylock/config
|
||||||
@@ -9053,6 +9061,7 @@ declare -a startup_array=(\
|
|||||||
# Status Bar
|
# Status Bar
|
||||||
"$HOME/.config/dwl/waybar/launch.sh" \ # Waybar (dwl configuration)
|
"$HOME/.config/dwl/waybar/launch.sh" \ # Waybar (dwl configuration)
|
||||||
# Background Processes
|
# Background Processes
|
||||||
|
"/usr/bin/swayidle" \ # Swayidle Idle Manager
|
||||||
"/usr/libexec/polkit-gnome-authentication-agent-1" \ # GNOME Polkit Authentication Agent
|
"/usr/libexec/polkit-gnome-authentication-agent-1" \ # GNOME Polkit Authentication Agent
|
||||||
"/usr/bin/kdeconnectd --replace" \ # KDE Connect Daemon
|
"/usr/bin/kdeconnectd --replace" \ # KDE Connect Daemon
|
||||||
"$HOME/.scripts/dunst.sh --on" \ # Dunst Notification Daemon
|
"$HOME/.scripts/dunst.sh --on" \ # Dunst Notification Daemon
|
||||||
@@ -9080,6 +9089,7 @@ declare -a kill_startup_array=(\
|
|||||||
# Status Bar
|
# Status Bar
|
||||||
"pkill waybar" \
|
"pkill waybar" \
|
||||||
# Background Processes
|
# Background Processes
|
||||||
|
"pkill swayidle" \
|
||||||
"pkill polkit-gnome-au" \
|
"pkill polkit-gnome-au" \
|
||||||
"pkill kdeconnectd" \
|
"pkill kdeconnectd" \
|
||||||
"$HOME/.scripts/dunst.sh --off" \
|
"$HOME/.scripts/dunst.sh --off" \
|
||||||
@@ -9225,6 +9235,7 @@ stow-create:
|
|||||||
-S ssh \
|
-S ssh \
|
||||||
-S starship \
|
-S starship \
|
||||||
-S swappy \
|
-S swappy \
|
||||||
|
-S swayidle \
|
||||||
-S swaylock \
|
-S swaylock \
|
||||||
-S swhkd \
|
-S swhkd \
|
||||||
-S syncthing \
|
-S syncthing \
|
||||||
@@ -9280,6 +9291,7 @@ stow-delete:
|
|||||||
-D ssh \
|
-D ssh \
|
||||||
-D starship \
|
-D starship \
|
||||||
-D swappy \
|
-D swappy \
|
||||||
|
-D swayidle \
|
||||||
-D swaylock \
|
-D swaylock \
|
||||||
-D swaync \
|
-D swaync \
|
||||||
-D swhkd \
|
-D swhkd \
|
||||||
@@ -9329,6 +9341,7 @@ stow-recreate:
|
|||||||
-R ssh \
|
-R ssh \
|
||||||
-R starship \
|
-R starship \
|
||||||
-R swappy \
|
-R swappy \
|
||||||
|
-R swayidle \
|
||||||
-R swaylock \
|
-R swaylock \
|
||||||
-R swhkd \
|
-R swhkd \
|
||||||
-R syncthing \
|
-R syncthing \
|
||||||
@@ -9850,7 +9863,7 @@ main() {
|
|||||||
;;
|
;;
|
||||||
--lock)
|
--lock)
|
||||||
notify-send "Session Control" "Locking Session" &
|
notify-send "Session Control" "Locking Session" &
|
||||||
swaylock
|
loginctl lock-session
|
||||||
;;
|
;;
|
||||||
--sleep)
|
--sleep)
|
||||||
notify-send "Session Control" "Going to Sleep" &
|
notify-send "Session Control" "Going to Sleep" &
|
||||||
|
@@ -45,7 +45,7 @@ main() {
|
|||||||
;;
|
;;
|
||||||
--lock)
|
--lock)
|
||||||
notify-send "Session Control" "Locking Session" &
|
notify-send "Session Control" "Locking Session" &
|
||||||
swaylock
|
loginctl lock-session
|
||||||
;;
|
;;
|
||||||
--sleep)
|
--sleep)
|
||||||
notify-send "Session Control" "Going to Sleep" &
|
notify-send "Session Control" "Going to Sleep" &
|
||||||
|
@@ -3,6 +3,7 @@ declare -a startup_array=(\
|
|||||||
# Status Bar
|
# Status Bar
|
||||||
"$HOME/.config/dwl/waybar/launch.sh" \ # Waybar (dwl configuration)
|
"$HOME/.config/dwl/waybar/launch.sh" \ # Waybar (dwl configuration)
|
||||||
# Background Processes
|
# Background Processes
|
||||||
|
"/usr/bin/swayidle" \ # Swayidle Idle Manager
|
||||||
"/usr/libexec/polkit-gnome-authentication-agent-1" \ # GNOME Polkit Authentication Agent
|
"/usr/libexec/polkit-gnome-authentication-agent-1" \ # GNOME Polkit Authentication Agent
|
||||||
"/usr/bin/kdeconnectd --replace" \ # KDE Connect Daemon
|
"/usr/bin/kdeconnectd --replace" \ # KDE Connect Daemon
|
||||||
"$HOME/.scripts/dunst.sh --on" \ # Dunst Notification Daemon
|
"$HOME/.scripts/dunst.sh --on" \ # Dunst Notification Daemon
|
||||||
@@ -30,6 +31,7 @@ declare -a kill_startup_array=(\
|
|||||||
# Status Bar
|
# Status Bar
|
||||||
"pkill waybar" \
|
"pkill waybar" \
|
||||||
# Background Processes
|
# Background Processes
|
||||||
|
"pkill swayidle" \
|
||||||
"pkill polkit-gnome-au" \
|
"pkill polkit-gnome-au" \
|
||||||
"pkill kdeconnectd" \
|
"pkill kdeconnectd" \
|
||||||
"$HOME/.scripts/dunst.sh --off" \
|
"$HOME/.scripts/dunst.sh --off" \
|
||||||
|
3
justfile
3
justfile
@@ -50,6 +50,7 @@ stow-create:
|
|||||||
-S ssh \
|
-S ssh \
|
||||||
-S starship \
|
-S starship \
|
||||||
-S swappy \
|
-S swappy \
|
||||||
|
-S swayidle \
|
||||||
-S swaylock \
|
-S swaylock \
|
||||||
-S swhkd \
|
-S swhkd \
|
||||||
-S syncthing \
|
-S syncthing \
|
||||||
@@ -105,6 +106,7 @@ stow-delete:
|
|||||||
-D ssh \
|
-D ssh \
|
||||||
-D starship \
|
-D starship \
|
||||||
-D swappy \
|
-D swappy \
|
||||||
|
-D swayidle \
|
||||||
-D swaylock \
|
-D swaylock \
|
||||||
-D swaync \
|
-D swaync \
|
||||||
-D swhkd \
|
-D swhkd \
|
||||||
@@ -154,6 +156,7 @@ stow-recreate:
|
|||||||
-R ssh \
|
-R ssh \
|
||||||
-R starship \
|
-R starship \
|
||||||
-R swappy \
|
-R swappy \
|
||||||
|
-R swayidle \
|
||||||
-R swaylock \
|
-R swaylock \
|
||||||
-R swhkd \
|
-R swhkd \
|
||||||
-R syncthing \
|
-R syncthing \
|
||||||
|
3
swayidle/.config/swayidle/config
Normal file
3
swayidle/.config/swayidle/config
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
timeout 600 "~/.scripts/session.sh --lock"
|
||||||
|
before-sleep "~/.scripts/session.sh --lock"
|
||||||
|
lock "swaylock"
|
Reference in New Issue
Block a user