dotfiles/hyprland/scripts/displaybyname.sh

14 lines
262 B
Bash
Raw Permalink Normal View History

2023-08-18 19:38:09 +02:00
#!/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