dotfiles/hyprland/scripts/displaybyname.sh

14 lines
262 B
Bash
Executable File

#!/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