get-class.sh 199 B

1234567
  1. #!/usr/bin/env bash
  2. set -euo pipefail # bash strict mode
  3. class=$(echo -e "$(xprop | grep "WM_CLASS\|_NET_WM_NAME\|WM_NAME")")
  4. notify-send -t 10000 "$class"
  5. echo "$class"
  6. echo "$class" | xclip -sel c