summaryrefslogtreecommitdiff
path: root/.i3lock/lock.sh
diff options
context:
space:
mode:
Diffstat (limited to '.i3lock/lock.sh')
-rwxr-xr-x.i3lock/lock.sh33
1 files changed, 22 insertions, 11 deletions
diff --git a/.i3lock/lock.sh b/.i3lock/lock.sh
index 52323d9..abce85f 100755
--- a/.i3lock/lock.sh
+++ b/.i3lock/lock.sh
@@ -2,11 +2,19 @@
if [ $(grep -r "RUNNING" /proc/asound | wc -l) -eq 0 ] || [[ $# -ne 0 ]]; then
# Disables dunst, my notification daemon, so I don't see notification on lock screen
+ #
+ # NOTE: Since I started using i3lock-color, dunst is never on top of lock screen, so if you want to use i3lock, uncomment the dunstctl set-paused lines
+ #
# https://github.com/dunst-project/dunst/issues/697
# https://wiki.archlinux.org/title/Dunst#Disable_dunst_temporarily
- dunstctl set-paused true
+
+ #dunstctl set-paused true
if [[ "$1" == "suspend" ]]; then
+ # Apps that are playing audio could stop being able to play audio after suspend (to fix, restart app)
+ # By restarting pipewire, I try to make sure that any audio that might be playing, stops
+ systemctl --user restart pipewire
+
# 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:
#
@@ -17,17 +25,20 @@ if [ $(grep -r "RUNNING" /proc/asound | wc -l) -eq 0 ] || [[ $# -ne 0 ]]; then
#
# 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
fi
- i3lock -f -c d49408 -i /home/kamen/.i3lock/lockscreen.png -n
+ # The first line is normal i3lock arguments, while the rest of the lines are i3lock-color ones
+ # If you want to use i3lock, remove those lines (and the \ at the end)
+ # But I hightly advise you to use i3lock-color, it's amazing: https://github.com/Raymo111/i3lock-color
+ i3lock -f -c d49408 -i /home/kamen/.i3lock/lockscreen.png -n \
+ -F -k --indicator --keylayout 1 --radius 95 --pass-volume-keys \
+ --date-str="%d.%m.%Y" --verif-text="Verifying…" --wrong-text="Wrong!" --noinput-text="No Input!" \
+ --insidever-color d47408cc --ringver-color d47408 --insidewrong-color c35b5bcc --ringwrong-color c35b5b \
+ --layout-color ffeede --time-color ffeede --date-color ffeede --greeter-color ffeede --verif-color ffeede --wrong-color ffeede
- dunstctl set-paused false # Enables my notification daemon
- killall lwa-hot-corners; lwa-hot-corners ~/.lwarc &
- killall tint2; nohup tint2 2>&1 &
- disown
- picom --experimental-backends & # Sometimes my compositor crashes or smth, so I try to launch it, just in case it stopped working
+ #dunstctl set-paused false # Enables my notification daemon
+ if [[ "$1" == "suspend" ]]; then
+ pkill tint2; gtk-launch tint2 # sometimes tint2 get's messed up and transparency breaks, this makes sure that this doesn't happen
+ gtk-launch picom # sometimes my compositor stops working after suspend, this makes sure it's running
+ fi
fi