This commit is contained in:
2022-08-16 12:42:56 +02:00
10 changed files with 102 additions and 11 deletions

View File

@@ -132,6 +132,7 @@ bindsym $mod+d exec "rofi -show run"
bindsym $mod+Tab exec "rofi -show"
bindsym $mod+s exec "rofi -show ssh"
bindsym $mod+n exec $vpnmanager
bindsym $mod+shift+v exec "rofi -modi 'clipboard:greenclip print' -show clipboard -run-command '{cmd}'"
############################################
# Media keys #
@@ -316,3 +317,4 @@ exec --no-startup-id nm-applet
exec_always feh --bg-scale $(find ~/Pictures/wallpapers/ -type f -name "*" | shuf -n 1)
exec /usr/bin/compton
exec /bin/bash ~/.config/i3/scripts/startup.sh
exec --no-startup-id greenclip daemon

View File

@@ -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