sway: lock screen when lid is closed
plus, update lock.sh script
This commit is contained in:
23
bin/lock.sh
23
bin/lock.sh
@@ -1,16 +1,13 @@
|
|||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
|
|
||||||
gtklock
|
__lock() {
|
||||||
|
gtklock
|
||||||
|
}
|
||||||
|
|
||||||
# leave it here in case i'll need it later
|
amount_of_outputs=$(swaymsg -t get_outputs | grep -i name | wc -l)
|
||||||
# swaylock \
|
|
||||||
# --screenshots \
|
if [[ "$amount_of_outputs" == "1" ]]; then
|
||||||
# --indicator \
|
__lock
|
||||||
# --indicator-radius 100 \
|
else
|
||||||
# --indicator-thickness 7 \
|
swaymsg output eDP-1 disable
|
||||||
# --clock \
|
fi
|
||||||
# --ring-color ffeced \
|
|
||||||
# --key-hl-color 0291ff \
|
|
||||||
# --effect-blur 7x5 \
|
|
||||||
# --effect-vignette 0.5:0.5 \
|
|
||||||
# --fade-in 0.2
|
|
||||||
|
|||||||
@@ -90,8 +90,7 @@ output $mainMonitor {
|
|||||||
mode 1920x1080@144Hz
|
mode 1920x1080@144Hz
|
||||||
}
|
}
|
||||||
|
|
||||||
bindswitch --reload --locked lid:on output $laptopMonitor disable
|
bindswitch --reload lid:on exec "$HOME/dotfiles/bin/lock.sh"
|
||||||
bindswitch --reload --locked lid:off output $laptopMonitor enable
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user