help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to get X Window id from within Emacs?


From: Eli Zaretskii
Subject: Re: How to get X Window id from within Emacs?
Date: Sun, 15 Dec 2024 20:25:53 +0200

> Date: Sun, 15 Dec 2024 20:52:13 +0300
> From: Jean Louis <bugs@gnu.support>
> 
> The standard shell commend `xwininfo' gives me the Window id, such as
> 0x2e000ac and then I can run shell command like `xdotool' to activate
> the Emacs window:
> 
> $ xwininfo 
> 
> xwininfo: Please select the window about which you
>           would like information by clicking the
>           mouse in that window.
> 
> xwininfo: Window id: 0x2e000ac "*shell* - GNU Emacs at lco2"
> 
> after switching to other workspace, then I can still do:
> 
> $ xdotool windowactivate 0x2e000ac
> 
> and I would return to Emacs X Window.
> 
> Is there a way to get the Window ID from within Emacs?

There's the window-id frame parameter, although I'm not sure it is
universally available.  Try

  M-: (frame-parameter nil 'window-id) RET



reply via email to

[Prev in Thread] Current Thread [Next in Thread]