unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Marcus Harnisch <mh-gmane@online.de>
To: help-gnu-emacs@gnu.org
Subject: Re: How can I (programmatically) tell if exwm is active?
Date: Wed, 16 Aug 2023 16:20:15 +0200	[thread overview]
Message-ID: <ubiluv$nr3$1@ciao.gmane.io> (raw)
In-Reply-To: <87sf8jayyy.fsf@ucl.ac.uk>

On 16/08/2023 15.39, Eric S Fraga wrote:
> On Wednesday, 16 Aug 2023 at 14:37, Marcus Harnisch wrote:
>> Check out the following environment variables:
> 
> Sorry, maybe I should have been more clear: I'm looking for an elisp
> variable or function that tells me that exwm is active.  Yes, I can
> drill down into the operating system (as Basile has suggested) and the
> process environment but I had imagined that there would something along
> the lines of `exwmp` or similar.  I just cannot find such which I find
> surprising but maybe I have not searched effectively.

If such a function existed, how would it work without doing essentially 
the same?

You could also follow this advice: https://askubuntu.com/a/466153
But note that this will also require drilling into the OS.

I'd probably not use procfs for that, since it is much harder to tell 
the different session apart. Less critical in single user scenarios but 
still...

> For the record, in any case,
> 
>> Check out the following environment variables:
>> DESKTOP_SESSION, XDG_SESSION_DESKTOP, GDMSESSION
> 
> none of these environment variables gives anything useful.  Obviously, I
> can set my own environment variable, say WM=exwm (or =stumpwm etc.) and
> maybe that's what I'll end up doing.

Not claiming to be an expert on these matters, it looks like at least 
XDG_SESSION_DESKTOP might be a common standard. So if you must roll your 
own, it could be a good idea to use that or one of the others.

Cheers,
Marcus





  reply	other threads:[~2023-08-16 14:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-16 10:27 How can I (programmatically) tell if exwm is active? Eric S Fraga
2023-08-16 11:27 ` Basile Starynkevitch
2023-08-16 12:37 ` Marcus Harnisch
2023-08-16 13:39   ` Eric S Fraga
2023-08-16 14:20     ` Marcus Harnisch [this message]
2023-08-16 14:34       ` Eric S Fraga

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='ubiluv$nr3$1@ciao.gmane.io' \
    --to=mh-gmane@online.de \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).