Added laptop idle controls

This commit is contained in:
Ezri Brimhall 2024-03-07 12:44:11 -07:00
parent 8ee47ab5a6
commit 2facf100c7
Signed by: ezri
GPG Key ID: D4EE46AFBD899DB5
5 changed files with 35 additions and 9 deletions

View File

@ -0,0 +1,5 @@
### -*-conf-space-*- ###
# Laptop Lid Switch Bindings #
### ###
bindswitch lid:on loginctl lock-session

View File

@ -1,9 +0,0 @@
# -*-conf-*-
timeout 10 'pgrep swaylock &> /dev/null && swaymsg "output * power off"' resume 'pgrep swaylock &> /dev/null && swaymsg "output * power on"'
timeout 15 'pgrep swaylock &> /dev/null && pkill -u 1000 -SIGSTOP electron' resume 'pgrep swaylock &> /dev/null && pkill -u 1000 -SIGCONT electron'
lock ~/.local/bin/screenlock
before-sleep 'loginctl lock-session'
unlock 'pkill -9 swaylock'
idlehint 600

1
.config/sway/swayidle Symbolic link
View File

@ -0,0 +1 @@
swayidle##class.desktop

View File

@ -0,0 +1,9 @@
# -*-conf-*-
timeout 10 'pgrep swaylock &> /dev/null && swaymsg "output * power off"' resume 'pgrep swaylock &> /dev/null && swaymsg "output * power on"'
timeout 15 'pgrep swaylock &> /dev/null && pkill -u 1000 -SIGSTOP electron' resume 'pgrep swaylock &> /dev/null && pkill -u 1000 -SIGCONT electron'
lock ~/.local/bin/screenlock
before-sleep 'loginctl lock-session'
unlock 'pkill -SIGUSR1 swaylock'
idlehint 600

View File

@ -0,0 +1,8 @@
# -*-conf-*-
timeout 10 'pgrep swaylock &> /dev/null && swaymsg output "*" power off' resume 'pgrep swaylock &> /dev/null && swaymsg output "*" power on'
lock ~/.local/bin/screenlock
before-sleep 'loginctl lock-session'
unlock 'pkill -SIGUSR1 swaylock'
idlehint 600

12
.zshrc Normal file
View File

@ -0,0 +1,12 @@
# Execute additional config scripts
autoload colors; colors
for file in $HOME/.config/zsh/*.zsh; do
if (( ${+LC_DEBUG} )); then echo "running $file"; fi
source $file
done
eval $(thefuck --alias)
setopt INC_APPEND_HISTORY_TIME