14 lines
262 B
Bash
14 lines
262 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
LOOK="$*"
|
||
|
|
||
|
IFS=$'\n'
|
||
|
for d in $(hyprctl -j monitors | jq -r '.[] | "\(.make) \(.model) \(.serial);\(.name)"');
|
||
|
do
|
||
|
if [[ "$d" == "$LOOK"* ]]; then
|
||
|
echo "$d" | awk -F';' '{print $2}'
|
||
|
exit
|
||
|
fi
|
||
|
done
|
||
|
exit 1
|