#!/bin/sh name=$(xdotool getactivewindow getwindowname) [ -n "$name" ] && printf "%s\n" "$(xdotool getactivewindow getwindowname)"