scripts/get-wm_class

14 lines
252 B
Plaintext
Raw Normal View History

2022-12-26 14:20:37 +01:00
#!/bin/bash
while read -a Line; do
if [ "${Line[0]}" == 'WM_CLASS(STRING)' ]; then
class=${Line[3]}
break
fi
done <<< "$(xprop)"
quick-notify "Class name: $class" "Copied to clipboard"
printf '%s' "$class" | xclip -sel clip