Embedded XFCE Panel with Script

For those using xfce as their DE, the panel can be easily embedded in the windows title bar. This provides more screen real estate without having to autohide the panel:

However, if the title of the window title bar is not static, then the changing name can spill into the panel. This script is low-resource and will start Chrome, keep renaming the changed window back to “Chrome,” and then kill itself after exiting Chrome. Obviously, you could name it anything you wanted and use it for whatever program. (I also use the script to rename any mousepad window simply “Mousepad”)

#!/bin/sh
( sleep 1
  while pgrep chrome
    do  xdotool search --name chrome 2>/dev/null | 
        while read id
           do xdotool set_window --name "Chrome" $id
           done
        sleep 1
    done
 ) &
/usr/bin/google-chrome-stable