diff options
| author | Syndamia <kamen.d.mladenov@protonmail.com> | 2021-06-11 08:24:20 +0300 |
|---|---|---|
| committer | Syndamia <kamen.d.mladenov@protonmail.com> | 2021-06-11 08:24:20 +0300 |
| commit | 48fe9977f8193e6323f6fafca26fab029816be97 (patch) | |
| tree | 4bb83fa1edcdc3a0c47efd256422fac269c245c1 /.i3lock | |
| parent | 3622addb4aa4c5ffe4eb4385862a747f7debf354 (diff) | |
| download | dotfiles-48fe9977f8193e6323f6fafca26fab029816be97.tar dotfiles-48fe9977f8193e6323f6fafca26fab029816be97.tar.gz dotfiles-48fe9977f8193e6323f6fafca26fab029816be97.zip | |
Improved jgmenu commands for logout and lock now, updated lock script with more information and better sleeping, fixed some configs
Diffstat (limited to '.i3lock')
| -rwxr-xr-x | .i3lock/lock.sh | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/.i3lock/lock.sh b/.i3lock/lock.sh index 7131e1e..4dc5357 100755 --- a/.i3lock/lock.sh +++ b/.i3lock/lock.sh @@ -1,13 +1,23 @@ #!/bin/bash if [ $(grep -r "RUNNING" /proc/asound | wc -l) -eq 0 ] || [[ $# -ne 0 ]]; then - # Also disables and enables dunst, my notification daemon + # Disables dunst, my notification daemon, so I don't see notification on lock screen # https://github.com/dunst-project/dunst/issues/697 # https://wiki.archlinux.org/title/Dunst#Disable_dunst_temporarily - killall -SIGUSR1 dunst + if [[ "$1" == "suspend" ]]; then - systemctl -i suspend + # Usually suspending should be done with "systemctl suspend", but I've had issues with that so I directly tell the kernel to sleep the system + # For that I have a script in /usr/loca/sbin that just continains: + # + # #!/bin/bash + # echo -n mem>/sys/power/state + # + # And I've added the following to /etc/sudoers (where kamen is my username), so I don't need to put in my password: + # + # kamen ALL = (root) NOPASSWD: /usr/local/sbin/sleep.sh + sudo -u root /usr/local/sbin/sleep.sh + # Audio could get messed up if something is playing while trying to suspend # By restarting pulseaudio, all playback gets "stopped", which should prevent any audio issues post-suspend pulseaudio -k @@ -15,7 +25,8 @@ if [ $(grep -r "RUNNING" /proc/asound | wc -l) -eq 0 ] || [[ $# -ne 0 ]]; then i3lock -f -c d49408 -i /home/kamen/.i3lock/lockscreen.png -n - killall -SIGUSR2 dunst + killall -SIGUSR2 dunst # Enables my notification daemon killall lwa-hot-corners; lwa-hot-corners ~/.lwarc & killall tint2; tint2 & + picom --experimental-backends & # Sometimes my compositor crashes or smth, so I try to launch it, just in case it stopped working fi |
