mirror of
https://github.com/Mastermindzh/dotfiles.git
synced 2025-08-09 10:59:16 +02:00
- Fixed i3lock re-using the last image
- Set up /etc/environment sharing
This commit is contained in:
@@ -4,7 +4,7 @@ icon="$HOME/.config/i3/icons/lock.png"
|
||||
tmpbg='/tmp/screen.png'
|
||||
|
||||
# detect whether tidal is running
|
||||
isPlaying=$(~/.config/i3/scripts/tidal-cli.sh status);
|
||||
isPlaying=$(~/.config/i3/scripts/tidal-cli.sh status)
|
||||
|
||||
scrot "$tmpbg"
|
||||
convert "$tmpbg" -scale 10% -scale 1000% "$tmpbg"
|
||||
@@ -15,15 +15,15 @@ convert "$tmpbg" "$icon" -gravity center -composite -matte "$tmpbg"
|
||||
|
||||
# check whether the lockscreen is being activated because of a suspend
|
||||
if [[ $* == *--suspend ]]; then
|
||||
# if it is, simply lock without no-fork
|
||||
i3lock -f -i "$tmpbg";
|
||||
# if it is, simply lock without no-fork
|
||||
i3lock -f -i "$tmpbg"
|
||||
else
|
||||
# if it isn't suspended, enable no-fork
|
||||
i3lock -n -f -i "$tmpbg";
|
||||
|
||||
# if tidal was playing before we locked, resume.
|
||||
if [ $isPlaying == "playing" ]; then
|
||||
~/.config/i3/scripts/tidal-cli.sh play
|
||||
fi;
|
||||
# if it isn't suspended, enable no-fork
|
||||
i3lock -n -f -i "$tmpbg"
|
||||
|
||||
# if tidal was playing before we locked, resume.
|
||||
if [ $isPlaying == "playing" ]; then
|
||||
~/.config/i3/scripts/tidal-cli.sh play
|
||||
fi
|
||||
rm -rf $tmpbg
|
||||
fi
|
||||
|
Reference in New Issue
Block a user