dtas-all
[Top][All Lists]
Advanced

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

Re: [PATCH 3/4] dtas-console: set X11 terminal title iff DISPLAY is set


From: Eric Wong
Subject: Re: [PATCH 3/4] dtas-console: set X11 terminal title iff DISPLAY is set
Date: Tue, 11 Jan 2022 17:29:59 +0000

James Rowe <jnrowe@gmail.com> wrote:
> * Eric Wong (e@80x24.org) wrote:
> > +set_title = ENV['DISPLAY'] ? $stdout : nil
> 
>   Perhaps consider testing for $WAYLAND_DISPLAY too?
> 
>   Use case: If, like me, you're running a wayland compositor without Xwayland
> support then $DISPLAY won't be set.

Does the following work for you?

[btw, please reply-to-all, since subscription is optional and it avoids
 nongnu.org being a SPOF, thanks]
-------8<------
diff --git a/bin/dtas-console b/bin/dtas-console
index 0e762bd..7a7ed6c 100755
--- a/bin/dtas-console
+++ b/bin/dtas-console
@@ -26,7 +26,7 @@
 c = DTAS::UNIXClient.new
 cur = YAML.load(c.req('current'))
 readable = [ se, w, $stdin ]
-set_title = ENV['DISPLAY'] ? $stdout : nil
+set_title = (ENV['DISPLAY'] || ENV['WAYLAND_DISPLAY']) ? $stdout : nil
 
 # current rg mode
 rg_mode = DTAS::RGState::RG_MODE.keys.unshift("off")



reply via email to

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