dotfiles/home/Scripts/lidclose.sh
Marko Korhonen b5b33afcd7
Removed commit history
Signed-off-by: Marko Korhonen <marko.korhonen@reekynet.com>
2019-10-26 20:05:31 +03:00

9 lines
284 B
Bash
Executable file

#!/bin/bash
displays=$(xrandr | grep " connected" | wc -l)
if [ $displays -eq 1 ]; then
i3lock-fancy; echo "systemctl suspend" > /home/reekymarko/Scripts/suspendcommand
else
echo "won't suspend, external display connected"
echo " " > /home/reekymarko/Scripts/suspendcommand
fi