mirror of
https://github.com/eliasrenman/dotfiles.git
synced 2026-03-16 20:46:08 +01:00
updated styling
This commit is contained in:
11
hypr/scripts/lock.sh
Normal file
11
hypr/scripts/lock.sh
Normal file
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Split the string into an array at spaces
|
||||
read -ra words <<<"$(xrandr | grep " connected" | awk '{print $1}')"
|
||||
|
||||
# Count the length of the array
|
||||
length=${#words[@]}
|
||||
|
||||
if [ -z "$length" ]; then
|
||||
exec swaylock
|
||||
fi
|
||||
Reference in New Issue
Block a user