Created
May 26, 2020 07:18
-
-
Save misebox/cfe99d8c94c6ac1a950a44a5eb95a23a to your computer and use it in GitHub Desktop.
Shellscript getting Window ID from command name with pgrep and xdotool.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
pid=`pgrep $1` | |
[ "$pid" != "" ] && xdotool search --onlyvisible --pid $pid |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment