How can I get the window ID of the terminal that my shell script is running in?
Background: I need to write a script to do something based on which virtual desktop it is running in. To get the virtual desktop (not current desktop, I may change it while the script is running), I need the window ID of the terminal that the script is running in. If the script is not run from a terminal, it should fail with an error.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With