scripts/get-wm_class
2022-12-26 14:20:37 +01:00

14 lines
252 B
Bash
Executable File

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