mirror of
https://github.com/vincentbernat/i3wm-configuration.git
synced 2025-06-25 03:08:34 +02:00
xss-lock: avoid too verbose logs
This is now logged by journald.
This commit is contained in:
parent
2491973cab
commit
fe659c5b44
1 changed files with 5 additions and 6 deletions
11
bin/xss-lock
11
bin/xss-lock
|
@ -1,6 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
me="$(readlink -f "$0")"
|
|
||||||
timeout=300
|
timeout=300
|
||||||
notify=10
|
notify=10
|
||||||
|
|
||||||
|
@ -16,10 +15,10 @@ unconfigure() {
|
||||||
case "$1" in
|
case "$1" in
|
||||||
start)
|
start)
|
||||||
configure
|
configure
|
||||||
exec xss-lock -s ${XDG_SESSION_ID} -n "$me notify" -l $me lock
|
exec xss-lock -s ${XDG_SESSION_ID} -n "$me notify" -l "$(readlink -f "$0")" lock
|
||||||
;;
|
;;
|
||||||
dim|notify)
|
dim|notify)
|
||||||
echo "$(date --rfc-3339=seconds) $me: notify: start"
|
echo "notify: start"
|
||||||
pkill -STOP redshift
|
pkill -STOP redshift
|
||||||
trap 'pkill -CONT redshift' EXIT
|
trap 'pkill -CONT redshift' EXIT
|
||||||
trap 'kill %%; exit 0' HUP
|
trap 'kill %%; exit 0' HUP
|
||||||
|
@ -31,7 +30,7 @@ case "$1" in
|
||||||
done
|
done
|
||||||
sleep 0.02
|
sleep 0.02
|
||||||
done
|
done
|
||||||
echo "$(date --rfc-3339=seconds) $me: notify: end"
|
echo "notify: end"
|
||||||
sleep infinity &
|
sleep infinity &
|
||||||
wait
|
wait
|
||||||
;;
|
;;
|
||||||
|
@ -41,10 +40,10 @@ case "$1" in
|
||||||
# First, stop any music player
|
# First, stop any music player
|
||||||
xdotool key XF86AudioStop
|
xdotool key XF86AudioStop
|
||||||
# Then, lock screen
|
# Then, lock screen
|
||||||
echo "$(date --rfc-3339=seconds) $me: lock: lock screen"
|
echo "lock: lock screen"
|
||||||
systemctl --user stop compton@$(systemd-escape -- "$DISPLAY").service
|
systemctl --user stop compton@$(systemd-escape -- "$DISPLAY").service
|
||||||
i3lock -n -e -i $HOME/.cache/awesome/current-wallpaper.png -t -f
|
i3lock -n -e -i $HOME/.cache/awesome/current-wallpaper.png -t -f
|
||||||
systemctl --user start compton@$(systemd-escape -- "$DISPLAY").service
|
systemctl --user start compton@$(systemd-escape -- "$DISPLAY").service
|
||||||
echo "$(date --rfc-3339=seconds) $me: lock: unlock screen"
|
echo "lock: unlock screen"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue