summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSyndamia <kamen.d.mladenov@protonmail.com>2021-07-01 12:45:03 +0300
committerSyndamia <kamen.d.mladenov@protonmail.com>2021-07-01 12:45:03 +0300
commitf5de788558e69c8a80ddb8124c18b5e90b2ad43d (patch)
treee412e4600686ae187a6b4ed39b8cce6a9dc5ac3f
parent329f5a6de3be9d790b1a6788bcb9267809382f36 (diff)
downloaddotfiles-f5de788558e69c8a80ddb8124c18b5e90b2ad43d.tar
dotfiles-f5de788558e69c8a80ddb8124c18b5e90b2ad43d.tar.gz
dotfiles-f5de788558e69c8a80ddb8124c18b5e90b2ad43d.zip
Fixed some typos and replaced double quotes with single ones where applicable
-rwxr-xr-x.i3lock/lock.sh22
1 files changed, 11 insertions, 11 deletions
diff --git a/.i3lock/lock.sh b/.i3lock/lock.sh
index 7d6409e..ad13822 100755
--- a/.i3lock/lock.sh
+++ b/.i3lock/lock.sh
@@ -18,15 +18,15 @@ when_unlocked_after_suspend () {
# This makes sure to not lock the screen if audio is playing and there are no arguments given
# It's mainly for preventing automatic screen locking while a video/music is playing
# If you still want to lock, just give it some argument, doesn't matter what
-if [ $(grep -r "RUNNING" /proc/asound | wc -l) -ne 0 ] && [[ $# -ne 0 ]]; then
+if [ $(grep -r 'RUNNING' /proc/asound | wc -l) -ne 0 ] && [[ $# -ne 0 ]]; then
exit
fi
# Show an error message if user is trying to suspend, while audio is playing, because that can mess up sound servers
# It tries to send a message via zenity, xmessage or notify-send, depending on which is installed
-# but it always sends a text message to stdout. In the end, scrit execution is stopped.
-if [ $(grep -r "RUNNING" /proc/asound | wc -l) -ne 0 ] && [[ "$1" == "suspend" ]]; then
- message="Please, stop all playing audio before trying to suspend!"
+# but it always sends a text message to stdout. In the end, script execution is stopped.
+if [ $(grep -r 'RUNNING' /proc/asound | wc -l) -ne 0 ] && [[ "$1" == 'suspend' ]]; then
+ message='Please, stop all playing audio before trying to suspend!'
if [ -x "$(command -v zenity)" ]; then
zenity --error --no-wrap --text="$message"
@@ -42,32 +42,32 @@ fi
# The first line of i3lock arguments uses standard 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
+# But I highly advise you to use i3lock-color, it's amazing: https://github.com/Raymo111/i3lock-color
(
before_locking && \
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!" \
+ --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 \
-&& when_unlocked && if [ -f "/tmp/slept" ]; then when_unlocked_after_suspend; rm /tmp/slept; fi
+&& when_unlocked && if [ -f '/tmp/slept' ]; then when_unlocked_after_suspend; rm /tmp/slept; fi
) &
-if [[ "$1" == "suspend" ]]; then
+if [[ "$1" == 'suspend' ]]; then
# A file is created to indicate that the system was suspended
- # After i3lock is done (unlocked), existance of this file is checked to determine if
+ # After i3lock is done (unlocked), existence of this file is checked to determine if
# script should run when_unlocked_after_suspend function
touch /tmp/slept
# Wait for the lock screen to appear, before suspending
- # Without this, sometimes you could awaken the computer and see the desktop for a second, before the lockscreen loads.
+ # Without this, sometimes you could awaken the computer and see the desktop for a second, before the lock screen loads.
# During that time, your input is processed by the desktop, giving you control of it, which is a big no-no (even if it's for a second)
while [ $(xdotool search --onlyvisible --classname i3lock | wc -l) -eq 0 ]; do
sleep 0.2
done
# 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:
+ # For that I have a script in /usr/loca/sbin that just contains:
#
# #!/bin/bash
# echo -n mem>/sys/power/state