Files
dotfiles/bin/lock.sh
2023-05-06 00:05:40 +03:00

20 lines
262 B
Bash
Executable File

#! /bin/bash
__lock() {
gtklock -d
}
if [[ "$1" == "just-lock" ]]; then
__lock
exit
fi
amount_of_outputs=$(swaymsg -t get_outputs | grep -i name | wc -l)
swaymsg output eDP-1 disable
if [[ "$amount_of_outputs" == "1" ]]; then
playerctl pause
__lock
fi