create wmpid

This commit is contained in:
Carlos de la Torre 2022-08-07 22:30:46 +03:00 committed by GitHub
parent 7af93bccbe
commit 51b342568a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

12
.local/bin/wmpid Normal file
View File

@ -0,0 +1,12 @@
#!/bin/sh
# This function is needed if there are multiple instances of the window manager.
export WM="dwm"
wmpid(){
tree="$(pstree -ps $$)"
tree="${tree#*$WM(}"
echo "${tree%%)*}"
}
eval wmpid